为什么 TeamCity 添加“csproj.teamcity.patch”到网络应用程序包文件?
我怀疑可能有一个简单的答案,我只是没有看到,但每当我使用 MSBuild 或 Visual Studio 解决方案运行程序针对 .csproj 和目标“Package”运行 TeamCity 构建时,构建工件始终包含“csproj”项目名称后的 .teamcity.patch" 字符串:
通过命令行运行相同的进程不包括这些。它给我带来的问题是,我的构建脚本有一个目标,该目标在包任务运行后查找“Web.deploy.cmd”,显然当文件以这种方式命名时它找不到它。我不愿更改构建脚本中的命令以包含 TeamCity 字符串,因为从构建服务器外部运行它会造成严重破坏。
谁能告诉我为什么会发生这种情况,以及当您需要能够按名称引用工件时您将如何解决它?
I suspect there's probably an easy answer to this I'm just not seeing, but whenever I run a TeamCity build with either MSBuild or the Visual Studio solution runner against a .csproj and target "Package", the build artifacts always include the "csproj.teamcity.patch" string after the project name:
Running the same process via command line doesn't include these. The problem it's causing me is that my build script has a target which looks for "Web.deploy.cmd" after the package task runs and obviously it's not finding it when files are named this way. I'm reticent to change the command in the build script to include the TeamCity string as it will play havoc with running it from outside the build servers.
Can anyone tell me why this is happening and how you'd work around it when you need to be able to refer to the artifacts by name?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将“teamcity.msbuild.generateWrappingScript”配置参数设置为“false”值,以使 TeamCity 避免生成包装脚本。
TeamCity MSBuild/Solution 构建运行程序用于生成包装脚本以添加 TeamCity 提供的任务。
You may set 'teamcity.msbuild.generateWrappingScript' configuration parameter with value 'false' to make TeamCity avoid generating wrapping script.
TeamCity MSBuild/Solution build runners used to generate wrapping scripts to add TeamCity-provided tasks.