开发者

Having trouble running code analysis from command prompt with msbuild

开发者 https://www.devze.com 2022-12-24 17:49 出处:网络
I\'m using VS2010 RC while targeting .NET 3.5.I can run code analysis via Visual Studio without a problem.However, when I try to run code analysis on our CI server it isn\'t getting executed.When I at

I'm using VS2010 RC while targeting .NET 3.5. I can run code analysis via Visual Studio without a problem. However, when I try to run code analysis on our CI server it isn't getting executed. When I attempt to build using msbuild 4.0 I get the following exception:

C:\Program Files (x86)\MSBuild\Microsoft\Visual开发者_C百科Studio\v10.0\CodeAnalysis\Microsoft.CodeAnalysis.targets(129,9): error MSB4018: The "CodeAnalysis" task failed unexpectedly.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\CodeAnalysis\Microsoft.CodeAnalysis.targets(129,9): error MSB4018: System.TypeLoadException: Could not load type 'System.Runtime.Versioning.TargetFrameworkAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Like I said, it works fine when I run it through VS.


You will have tough times to set this up...

I would install VS2010 on the build server. Problem solved.

Note:
The Build server should be a replication of your developer environment (not production environment)

0

精彩评论

暂无评论...
验证码 换一张
取 消