Search code examples
msbuild.net-2.0bamboo

Bamboo Build .Net Framework 2.0


My project failed to build on Bamboo server, but my project successfully built on my local machine. My project is using the .Net Framework 2.0.

Error:

LC : error LC0000: 'Could not load file or assembly 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Internals\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Internals.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.' [C:\Atlassian\Bamboo-Home\xml-data\build-dir\23822338\OCODEA-MER-JOB1\BACKOFFICE\example.csproj]

enter image description here


Solution

  • You're trying to build .net 2 with msbuild from .net 4. Are you sure there is .net 2 on the bamboo agent? and it would probably help if you build it with msbuild 2.0. That whay you know for sure the frameworks there. For sinplicity.