Failed to load assembly from solution file

I'm having some issues trying to get a .NET test solution with 2 projects to build on a new install of the latest version of TeamCity. I get a cannot load assembly, find manifest build error (below) but I have opened the actual solution that is copied to the C:\TeamCity\buildAgent\work\6d994e740ea35115 directory and it builds successfully. Is there anyway to troubleshoot this further and get some more info on exactly which assembly cannot be loaded?


VS2010, .NET framework 4, x86

[07:48:23]Checking for changes
[07:48:24]Publishing internal artifacts
[07:48:24]Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[07:48:24]Clean build enabled: removing old files from C:\TeamCity\buildAgent\work\6d994e740ea35115
[07:48:24]Checkout directory: C:\TeamCity\buildAgent\work\6d994e740ea35115
[07:48:24]Updating sources: server side checkout (4s)
[07:48:28]Starting: C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe #TeamCityImplicit
[07:48:28]in directory: C:\TeamCity\buildAgent\work\6d994e740ea35115
[07:48:32]2012-08-23 07:48:32,187 [12440] ERROR JetBrains.TeamCity.Utils.Runtime.ParseUtil - Failed to load assembly from file C:\TeamCity\buildAgent\work\6d994e740ea35115\trunk\CIWinCalculator\CIWinCalculator.sln: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)
[07:48:32]System.BadImageFormatException: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)
[07:48:32] at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
[07:48:32] at System.Reflection.Assembly.LoadFile(String path)
[07:48:32] at JetBrains.TeamCity.Utils.Runtime.ParseUtil.LoadAssembly(String value) in c:\BuildAgent\work\e6509710c0972c73\src\Utils\src\Runtime\ParseUtil.cs:line 110
[07:48:32]Failed to start process due to error:
[07:48:32]JetBrains.TeamCity.Utils.CommandLineParseException: Failed to load assembly from file C:\TeamCity\buildAgent\work\6d994e740ea35115\trunk\CIWinCalculator\CIWinCalculator.sln: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018) ---> System.BadImageFormatException: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)
[07:48:32] at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
[07:48:32] at System.Reflection.Assembly.LoadFile(String path)
[07:48:32] at JetBrains.TeamCity.Utils.Runtime.ParseUtil.LoadAssembly(String value) in c:\BuildAgent\work\e6509710c0972c73\src\Utils\src\Runtime\ParseUtil.cs:line 110
[07:48:32] --- End of inner exception stack trace ---
[07:48:32] at JetBrains.TeamCity.Utils.Runtime.ParseUtil.LoadAssembly(String value) in c:\BuildAgent\work\e6509710c0972c73\src\Utils\src\Runtime\ParseUtil.cs:line 116
[07:48:32] at JetBrains.TeamCity.PlatformProcessRunner.PlatformSwitchBase.Main2(String[] args) in c:\BuildAgent\work\e6509710c0972c73\src\PlatformProcessRunner\src\PlatformSwitchBase.cs:line 66
[07:48:32] at JetBrains.TeamCity.PlatformProcessRunner.PlatformSwitchBase.Main(String[] args) in c:\BuildAgent\work\e6509710c0972c73\src\PlatformProcessRunner\src\PlatformSwitchBase.cs:line 24
[07:48:32]Process exited with code -1
[07:48:32]Publishing internal artifacts
[07:48:32]Build finished

2 comments
Comment actions Permalink

Anyone have any idea on how to troubleshoot this please?  I get the same problem with a basic one test project solution as well with the .NET process runner build step set to either the .sln file or the csproj file.  Used to work in the old version of TeamCity I had installed previously

Checking for changes
[17:41:46]Publishing internal artifacts
[17:41:46]Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[17:41:46]Clean build enabled: removing old files from C:\TeamCity\buildAgent\work\6d994e740ea35115
[17:41:46]Checkout directory: C:\TeamCity\buildAgent\work\6d994e740ea35115
[17:41:46]Updating sources: server side checkout (3s)
[17:41:50]Starting: C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe #TeamCityImplicit
[17:41:50]in directory: C:\TeamCity\buildAgent\work\6d994e740ea35115
[17:41:54]2012-08-28 17:41:54,386 [7228] ERROR JetBrains.TeamCity.Utils.Runtime.ParseUtil - Failed to load assembly from file C:\TeamCity\buildAgent\work\6d994e740ea35115\trunk\TestConsoleApp\TestConsoleApp\TestConsoleApp.csproj: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)
[17:41:54]System.BadImageFormatException: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)
[17:41:54] at System.Reflection.Assembly.nLoadFile(String path, Evidence evidence)
[17:41:54] at System.Reflection.Assembly.LoadFile(String path)
[17:41:54] at JetBrains.TeamCity.Utils.Runtime.ParseUtil.LoadAssembly(String value) in c:\BuildAgent\work\e6509710c0972c73\src\Utils\src\Runtime\ParseUtil.cs:line 110
[17:41:54]Failed to start process due to error:
[17:41:54]JetBrains.TeamCity.Utils.CommandLineParseException: Failed to load assembly from file C:\TeamCity\buildAgent\work\6d994e740ea35115\trunk\TestConsoleApp\TestConsoleApp\TestConsoleApp.csproj: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018) ---> System.BadImageFormatException: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)
[17:41:54] at System.Reflection.Assembly.nLoadFile(String path, Evidence evidence)
[17:41:54] at System.Reflection.Assembly.LoadFile(String path)
[17:41:54] at JetBrains.TeamCity.Utils.Runtime.ParseUtil.LoadAssembly(String value) in c:\BuildAgent\work\e6509710c0972c73\src\Utils\src\Runtime\ParseUtil.cs:line 110
[17:41:54] --- End of inner exception stack trace ---
[17:41:54] at JetBrains.TeamCity.Utils.Runtime.ParseUtil.LoadAssembly(String value) in c:\BuildAgent\work\e6509710c0972c73\src\Utils\src\Runtime\ParseUtil.cs:line 124
[17:41:54] at JetBrains.TeamCity.PlatformProcessRunner.PlatformSwitchBase.Main2(String[] args) in c:\BuildAgent\work\e6509710c0972c73\src\PlatformProcessRunner\src\PlatformSwitchBase.cs:line 66
[17:41:54] at JetBrains.TeamCity.PlatformProcessRunner.PlatformSwitchBase.Main(String[] args) in c:\BuildAgent\work\e6509710c0972c73\src\PlatformProcessRunner\src\PlatformSwitchBase.cs:line 24
[17:41:54]Process exited with code -1
[17:41:54]Publishing internal artifacts
[17:41:54]Build finished
0
Comment actions Permalink

Have now resolved this.  It was down to an incorrect runner type on the build step which I had recreated trying to troubleshoot something else (.NET process runner was selected instead of Visual Studio (sln))

0

Please sign in to leave a comment.