[英]How come my solution builds in Visual Studio but not from the command line using msbuild?
If anyone has any idea where to start troubleshooting this, I'd love to hear it. 如果有人知道从哪里开始排除故障,我很乐意听到。 I just upgraded my project to VS2012, Wix 3.6 and .NET 4.5 and I have like 2000 errors whenever I try to build my using the command line (msbuild): http://i.imgur.com/WSi7X.png
我刚刚将我的项目升级到VS2012,Wix 3.6和.NET 4.5,每当我尝试使用命令行(msbuild)构建我时,我都会遇到2000个错误: http : //i.imgur.com/WSi7X.png
It builds fine from Visual Studio, but I get a bunch of errors when msbuild is invoked from the command line like this: http://pastie.org/5102451 它从Visual Studio构建得很好,但是当从命令行调用msbuild时我得到了一堆错误: http : //pastie.org/5102451
You should make sure you are using the right tools version in your msbuild file: 您应该确保在msbuild文件中使用正确的工具版本:
Force a tool version with MSBuild from inside the file? 从文件内部强制使用MSBuild的工具版本?
This may not be the case, but I often found that this would trip others up in the team when migrating to a new .net runtime and using msbuild. 情况可能并非如此,但我经常发现,当迁移到新的.net运行时并使用msbuild时,这会让团队中的其他人绊倒。
== Edit == ==编辑==
Sorry just noticed you are running it DIRECTLY on the command line and not through some build script so the above solution may not be 100% relevant, but it may still be that the version of MSBuild being executed is unable to handle your .net runtime, as all it takes is 1 project to fail building and then all dependent projects will fail giving your 1000s of random errors whereas really there is only 1 meaningful error that needs to be addressed. 抱歉,您刚刚注意到您在命令行上直接运行它,而不是通过某些构建脚本运行它,因此上述解决方案可能不是100%相关,但可能仍然是正在执行的MSBuild版本无法处理您的.net运行时,因为只需要1个项目来构建失败,然后所有依赖项目都会失败,给出1000个随机错误,而实际上只有1个有意义的错误需要解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.