TeamCity 6.5 中的 MSBuild 运行程序更改
我们最近升级到 TeamCity 6.5 Enterprise,它开始抱怨 MSBuild 运行程序步骤中的 /p 命令行参数,建议将这些参数移至构建参数。所以我从“命令行参数:”中删除了所有 /p 并将它们添加到构建参数中。平台参数立即出现问题:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(483, 9): The OutputPath property is not set for project 'MyProj.csproj.teamcity'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Testing' Platform='Any CPU'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.
我的构建场景包括很多步骤,一些构建 sln 文件,其他 .csproj/.msbuild 没有解决方案文件。根据您构建的内容,处理 Platform 参数的方式有所不同(如所讨论的 此处) - “任何CPU”或“任何CPU”。据我了解,情况是这样的。可以在不恢复到运行程序中的 /p 命令行参数的情况下修复此问题吗?
此外,这个新的 MSBuild 运行程序没有记录它使用的确切命令行,因此很难诊断此类问题。非常令人沮丧。
We've recently upgraded to TeamCity 6.5 Enterprise which started to complain about /p command line parameters in MSBuild runner steps suggesting to move those to Build Parameters. So i deleted all my /p from "Command line parameters:" and added them in Build Parameters. The problems appeared immediately with Platform param:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(483, 9): The OutputPath property is not set for project 'MyProj.csproj.teamcity'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Testing' Platform='Any CPU'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.
My build scenario includes lots of steps, some building sln-files, others .csproj/.msbuild without solution file. There is a different on how Platform parameter is treated depending on what you build (as discussed here) - "AnyCPU" or "Any CPU". As far as I understand this is the case. Can this be fixed without reverting back to /p command line parameters in the runner?
Also, this new MSBuild runner suffers from not logging the exact command line it uses making it hard to diagnose such issues. Very frustrating.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下是两个相关问题及其答案,一个是关于 TeamCity 构建参数的,另一个是关于 OutputPath 属性的,您应该使用 OutDir 来指定该属性。
MSBuild:OutputPath 目录为空
TeamCity 表示使用“构建参数”而不是 MSBuild 步骤中的“/property:”。这是什么意思?
Here's two related questions with answers, one for TeamCity build parameters, and another for the OutputPath property, which you should specify using OutDir instead.
MSBuild: OutputPath directory is empty
TeamCity says to use "Build Parameters" instead of "/property:" in an MSBuild step. What does that mean?