Created
March 1, 2013 04:09
-
-
Save hotgazpacho/5062413 to your computer and use it in GitHub Desktop.
This code works fine on my local machine, but when I run it on the build server, I get the exception below
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void CreateTemplateDatabase(SqlConnectionStringBuilder csb) | |
{ | |
var migration = new Migrate().Set(c => | |
{ | |
c.ConnectionString = csb.ConnectionString; | |
c.SqlFilesDirectory = string.Format(@"{0}\Database", TempDir); | |
c.RestoreFromPath = string.Format(@"{0}\Database\MyProject.bak", TempDir); | |
c.Silent = true; | |
c.Restore = true; | |
c.SchemaName = "Iddeal"; | |
c.DoNotCreateDatabase = false; | |
c.RestoreCustomOptions = | |
string.Format(@"MOVE 'MyProject' TO '{0}\{1}.mdf', MOVE 'MyProject_log' TO '{0}\{1}_log.ldf'", | |
TempDir, csb.InitialCatalog); | |
c.Debug = true; | |
c.Logger = new ConsoleLogger(true); | |
}); | |
migration.RunRestore(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[22:38:55]Step 2/2: Run Features (MSBuild) (17s) | |
[22:38:55][Step 2/2] Starting: C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MsBuildBootstrap.exe /workdir:C:\BuildAgent\work\10440b3c817fefc4 /msbuildPath:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe | |
[22:38:55][Step 2/2] in directory: C:\BuildAgent\work\10440b3c817fefc4 | |
[22:38:59][Step 2/2] Build\MyProject.build.teamcity: Build target: RunFeatures (12s) | |
[22:38:59][Build\MyProject.build.teamcity] RunFeatures (12s) | |
[22:38:59][RunFeatures] Copy | |
[22:38:59][Copy] Copying file from "ForceNet40Runtime.config" to "..\packages\SpecFlow.1.9.0\tools\specflow.exe.config". | |
[22:38:59][RunFeatures] Exec | |
[22:38:59][Exec] "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\CorFlags.exe" ..\packages\SpecFlow.1.9.0\tools\specflow.exe /32BIT+ | |
[22:38:59][Exec] Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 4.0.30319.1 | |
[22:38:59][Exec] Copyright (c) Microsoft Corporation. All rights reserved. | |
[22:38:59][Exec] | |
[22:38:59][RunFeatures] Executing Features | |
[22:38:59][RunFeatures] Exec (10s) | |
[22:38:59][Exec] ..\packages\NUnit.Runners.2.6.2\tools\nunit-console-x86.exe /labels /framework=net-4.0 ..\MyProject.Specs\bin\x86\Release\MyProject.Specs.dll | |
[22:38:59][Exec] NUnit-Console version 2.6.2.12296 | |
[22:38:59][Exec] Copyright (C) 2002-2012 Charlie Poole. | |
[22:38:59][Exec] Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov. | |
[22:38:59][Exec] Copyright (C) 2000-2002 Philip Craig. | |
[22:38:59][Exec] All Rights Reserved. | |
[22:38:59][Exec] | |
[22:38:59][Exec] Runtime Environment - | |
[22:38:59][Exec] OS Version: Microsoft Windows NT 6.1.7601 Service Pack 1 | |
[22:38:59][Exec] CLR Version: 2.0.50727.5466 ( Net 3.5 ) | |
[22:38:59][Exec] | |
[22:38:59][Exec] ProcessModel: Default DomainUsage: Single | |
[22:38:59][Exec] Execution Runtime: net-4.0 | |
[22:39:09][Exec] ***** MyProject.Specs.EditExamHistoryFeature.CommittingMassChangesToASelectionOfExamsIncludingIST | |
[22:39:09][Exec] ***** MyProject.Specs.EditExamHistoryFeature.CommittingMassChangesToHistoricalExams | |
[22:39:09][Exec] ***** MyProject.Specs.EditExamHistoryFeature.MakingMassChangesToApprovedISTExams | |
[22:39:09][Exec] ***** MyProject.Specs.EditExamHistoryFeature.MakingMassChangesToApprovedISTISIAndHistoricalExams | |
[22:39:09][Exec] ***** MyProject.Specs.EditExamHistoryFeature.MakingMassChangesToHistoricalExams | |
[22:39:09][Exec] ***** MyProject.Specs.EditExamHistoryFeature.MakingMassChangesToISIExams | |
[22:39:09][Exec] | |
[22:39:09][Exec] Tests run: 6, Errors: 0, Failures: 6, Inconclusive: 0, Time: 7.8667481 seconds | |
[22:39:09][Exec] Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0 | |
[22:39:09][Exec] | |
[22:39:09][Exec] Errors and Failures: | |
[22:39:09][Exec] EXEC MyProject.Specs.EditExamHistoryFeature | |
[22:39:09][Exec] The previous error was converted to a warning because the task was called with ContinueOnError=true. | |
[22:39:09][Exec] SetUp : StructureMap.StructureMapException : StructureMap Exception Code: 207 | |
[22:39:09][Exec] Internal exception while creating Instance '10ed0691-496b-422a-b7e3-0ac0e5a38a6c' of PluginType roundhouse.databases.Database, roundhouse, Version=0.8.5.0, Culture=neutral, PublicKeyToken=91b86fd44f1f23bc. Check the inner exception for more details. | |
[22:39:09][Exec] ----> System.NullReferenceException : A type could not be created from the object you passed. "roundhouse.databases.sqlserver.SqlServerDatabase, roundhouse.databases.sqlserver" resolves to null. | |
[22:39:09][Exec] at StructureMap.Pipeline.ConstructorInstance`1.build(Type pluginType, BuildSession session) | |
[22:39:09][Exec] at StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session) | |
[22:39:09][Exec] at StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session) | |
[22:39:09][Exec] at StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance instance, BuildSession session) | |
[22:39:09][Exec] at StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instance) | |
[22:39:09][Exec] at StructureMap.BuildSession.<>c__DisplayClass3.<.ctor>b__1() | |
[22:39:09][Exec] at StructureMap.BuildSession.CreateInstance(Type pluginType) | |
[22:39:09][Exec] at StructureMap.Container.GetInstance[T]() | |
[22:39:09][Exec] at StructureMap.ObjectFactory.GetInstance[PLUGINTYPE]() | |
[22:39:09][Exec] at roundhouse.infrastructure.app.ApplicationConfiguraton.build_items_for_container(ConfigurationPropertyHolder configuration_property_holder) | |
[22:39:09][Exec] at roundhouse.infrastructure.app.ApplicationConfiguraton.build_the_container(ConfigurationPropertyHolder configuration_property_holder) | |
[22:39:09][Exec] at roundhouse.Migrate.Run() | |
[22:39:09][Exec] at roundhouse.Migrate.RunRestore() | |
[22:39:09][Exec] at MyProject.Specs.TestEnvironment.CreateTemplateDatabase(SqlConnectionStringBuilder csb) in c:\BuildAgent\work\aff680d58180ae3c\MyProject.Specs\TestEnvironment.cs:line 208 | |
[22:39:09][Exec] at MyProject.Specs.TestEnvironment.BeforeTestRun() in c:\BuildAgent\work\aff680d58180ae3c\MyProject.Specs\TestEnvironment.cs:line 53 | |
[22:39:09][Exec] at lambda_method(Closure , IContextManager ) | |
[22:39:09][Exec] at TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) | |
[22:39:09][Exec] at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.FireEvents(HookType bindingEvent) | |
[22:39:09][Exec] at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnTestRunnerStart() | |
[22:39:09][Exec] at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.Initialize(Assembly[] bindingAssemblies) | |
[22:39:09][Exec] at TechTalk.SpecFlow.TestRunner.InitializeTestRunner(Assembly[] bindingAssemblies) | |
[22:39:09][Exec] at TechTalk.SpecFlow.Infrastructure.TestRunnerFactory.Create(Assembly testAssembly) | |
[22:39:09][Exec] at TechTalk.SpecFlow.TestRunnerManager.CreateTestRunner(TestRunnerKey key) | |
[22:39:09][Exec] at TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(TestRunnerKey key) | |
[22:39:09][Exec] at TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(Assembly testAssembly, Boolean async) | |
[22:39:09][Exec] at TechTalk.SpecFlow.TestRunnerManager.GetTestRunner() | |
[22:39:09][Exec] at MyProject.Specs.EditExamHistoryFeature.FeatureSetup() in c:\BuildAgent\work\aff680d58180ae3c\MyProject.Specs\EditExamHistory.feature.cs:line 0 | |
[22:39:09][Exec] --NullReferenceException | |
[22:39:09][Exec] at roundhouse.infrastructure.loaders.DefaultInstanceCreator.create_object_from_string_type(String object_to_create) | |
[22:39:09][Exec] at roundhouse.infrastructure.loaders.DefaultInstanceCreator.create_object_from_string_type[T](String object_to_create) | |
[22:39:09][Exec] at roundhouse.infrastructure.app.builders.DatabaseBuilder.build(FileSystemAccess file_system, ConfigurationPropertyHolder configuration_property_holder) | |
[22:39:09][Exec] at roundhouse.infrastructure.app.ApplicationConfiguraton.<>c__DisplayClass5.<build_items_for_container>b__1(IContext context) | |
[22:39:09][Exec] at StructureMap.Pipeline.ConstructorInstance`1.build(Type pluginType, BuildSession session) | |
[22:39:09][Exec] | |
[22:39:09][Exec] 2) Parent Failure : MyProject.Specs.EditExamHistoryFeature.CommittingMassChangesToASelectionOfExamsIncludingIST | |
[22:39:09][Exec] TestFixtureSetUp failed in EditExamHistoryFeature | |
[22:39:09][Exec] 3) Parent Failure : MyProject.Specs.EditExamHistoryFeature.CommittingMassChangesToHistoricalExams | |
[22:39:09][Exec] TestFixtureSetUp failed in EditExamHistoryFeature | |
[22:39:09][Exec] 4) Parent Failure : MyProject.Specs.EditExamHistoryFeature.MakingMassChangesToApprovedISTExams | |
[22:39:09][Exec] TestFixtureSetUp failed in EditExamHistoryFeature | |
[22:39:09][Exec] 5) Parent Failure : MyProject.Specs.EditExamHistoryFeature.MakingMassChangesToApprovedISTISIAndHistoricalExams | |
[22:39:09][Exec] TestFixtureSetUp failed in EditExamHistoryFeature | |
[22:39:09][Exec] 6) Parent Failure : MyProject.Specs.EditExamHistoryFeature.MakingMassChangesToHistoricalExams | |
[22:39:09][Exec] TestFixtureSetUp failed in EditExamHistoryFeature | |
[22:39:09][Exec] 7) Parent Failure : MyProject.Specs.EditExamHistoryFeature.MakingMassChangesToISIExams | |
[22:39:09][Exec] TestFixtureSetUp failed in EditExamHistoryFeature | |
[22:39:09][Exec] | |
[22:39:09][Exec] C:\BuildAgent\work\10440b3c817fefc4\Build\MyProject.build(408, 3): warning MSB3073: The command "..\packages\NUnit.Runners.2.6.2\tools\nunit-console-x86.exe /labels /framework=net-4.0 ..\MyProject.Specs\bin\x86\Release\MyProject.Specs.dll" exited with code 6. | |
[22:39:09][Exec] The previous error was converted to a warning because the task was called with ContinueOnError=true. | |
[22:39:09][Exec] Build continuing because "ContinueOnError" on the task "Exec" is set to "true". |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment