Trying to build a VS2010 csproj from command prompt
The error I get is:
c:\windows\microsoft.net\framework\v4.0.30319\microsoft.csharp.targets(132,9) : error MSB4066: The attribu开发者_如何学Cte "Returns" in element is unrecognized.
Does anyone have any idea how to resolve this issue?
The Returns
attribute is new for MSBuild 4. Is your project targeting an older version of the .NET Framework?
If it isn't, I suggest you try changing the project to target .NET Framework 4 and see if it solves the problem.
If this doesn't help, run the command msbuild /version
to check which version you are running. If it's not version 4.0.30319.1, you are running an old version that doesn't know what Returns
means. If that's the case, you probably also have Visual Studio 2008 installed, and maybe it has precedence over Visual Studio 2010 in your PATH
environment variable.
精彩评论