为什么 TeamCity 添加“csproj.teamcity.patch”到网络应用程序包文件?

发布于 2024-10-03 01:56:53 字数 416 浏览 0 评论 0原文

我怀疑可能有一个简单的答案,我只是没有看到,但每当我使用 MSBuild 或 Visual Studio 解决方案运行程序针对 .csproj 和目标“Package”运行 TeamCity 构建时,构建工件始终包含“csproj”项目名称后的 .teamcity.patch" 字符串:

alt text

通过命令行运行相同的进程不包括这些。它给我带来的问题是,我的构建脚本有一个目标,该目标在包任务运行后查找“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:

alt text

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

坦然微笑 2024-10-10 01:56:53

您可以将“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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文