I am using VS2010 RC when configuring .NET 3.5. I can run code analysis through Visual Studio without any problems. However, when I try to analyze the code on our CI server, it fails. When I try to build using msbuild 4.0, I get the following exception:
C: \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v10.0 \ CodeAnalysis \ Microsoft.CodeAnalysis.targets (129.9): error MSB4018: task "CodeAnalysis" unexpectedly ended.
C: \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v10.0 \ CodeAnalysis \ Microsoft.CodeAnalysis.targets (129.9): error MSB4018: System.TypeLoadException: Failed to load type 'System.Runtime.Versioning. TargetFrameworkAttribute 'from assembly' mscorlib, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089
As I said, it works great when I run it through VS.
source
share