简体   繁体   中英

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 attribute "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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM