问题描述
我花了很多时间试图弄清楚为什么我的项目在 TFS2010 上使用默认(空白)配置构建,但如果我将其设置为任何内容,则告诉我没有输出路径.
I spent a great many hours trying to work out why my project builds with the default (blank) configuration on TFS2010 but tells me there's no output path if I set it to anything.
最后,我意识到在 .csproj 文件中,配置写为 AnyCPU
而对于 TFS,建议的下拉值是 Any CPU
(注意空间).
In the end, I realised that in the .csproj file the configuration is written as AnyCPU
while for TFS the proposed drop-down value is Any CPU
(notice the space).
我删除了 TFS 配置中的空间并且它起作用了.
I removed the space in the TFS configuration and it worked.
该项目是从 VS2008 版本转换而来的.MS为VS2010版本更改了配置名称吗?有人能告诉我发生了什么吗?
The project was converted from a VS2008 version. Did MS change the name of the configuration for the VS2010 version?Can someone tell me what's happening?
推荐答案
这似乎是 VS2010 中的已知错误.
请参阅 http://connect.microsoft.com/VisualStudio/feedback/details/503935/msbuild-inconsistent-platform-for-any-cpu-between-solution-and-project 了解更多详情.
This seems to be a known bug in VS2010.
See http://connect.microsoft.com/VisualStudio/feedback/details/503935/msbuild-inconsistent-platform-for-any-cpu-between-solution-and-project for more details.
我发现了什么:
即使您在配置窗口中选择了Any CPU",解决方案中的所有项目文件也将平台设置为AnyCPU".因此,如果您在 VS 中构建此解决方案,则一切正常.当您尝试使用 TFSAny CPU"平台构建时,解决方案工作正常,但必须(在 msbuild 任务上)设置项目以使用/p:AnyCPU.
All project files in a solution have the platform set to "AnyCPU" even though you select "Any CPU" in the configuration window. So if you build this solution in VS, everything works fine.When you try to build using the TFS "Any CPU" platform, solutions work fine, but projects have to be set (on the msbuild task) to use /p:AnyCPU.
这篇关于“任何CPU"与“任何 CPU"在 TFS 2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!