gpt4 book ai didi

tfs - 如何更改 MSBuild 在 Team Foundation Build 下使用的构建目录?

转载 作者:行者123 更新时间:2023-12-04 05:35:58 25 4
gpt4 key购买 nike

尝试使用 Team Foundation Build 构建我的应用程序时出现以下错误:

C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1682,9): error MSB3554: Cannot write to the output file "obj\Release\Company.Redacted.BlahBlah.Localization.Subsystems. Startup_Shutdown_Processing.StartupShutdownProcessingMessages.de.resources". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.



我的项目在我的开发机器上构建得很好,因为源只有两个文件夹深,但 TF Build 似乎使用了一个非常深的目录,导致它中断。如何更改使用的文件夹?

编辑:我检查了存储在源代码管理中的构建的 .proj 文件,发现以下内容:
<!--  BUILD DIRECTORY
This property is included only for backwards compatibility. The build directory used for a build
definition is now stored in the database, as the BuildDirectory property of the definition's
DefaultBuildAgent. For compatibility with V1 clients, keep this property in sync with the value
in the database.
-->
<BuildDirectoryPath>UNKNOWN</BuildDirectoryPath>

如果这是存储在数据库中,我该如何更改它?

编辑:发现以下博客文章可能指向我的解决方案。现在我只需要弄清楚如何更改构建代理中的设置。 http://blogs.msdn.com/jpricket/archive/2007/04/30/build-type-builddirectorypath-build-agent-working-directory.aspx

目前我的工作目录是“$(Temp)\$(BuildDefinitionPath)”,但现在我不知道可以使用哪些通配符来指定不同的文件夹。

最佳答案

您需要编辑您的构建代理的构建工作目录,以便请求路径更小一些。要编辑构建代理,请右键单击“构建”节点并选择“管理构建代理...”

我个人使用类似 c:\bw\$(BuildDefinitionId) 的东西。 $(BuildDefinitionId) 转换为构建定义的 id(因此得名 :-) ),这意味着您将获得一个以 c:\bw\36 开头的构建路径,而不是 c:\Documents and Settings\tfsbuild\Local Settings\Temp\BuildDefinitionName

祝你好运,

马丁。

关于tfs - 如何更改 MSBuild 在 Team Foundation Build 下使用的构建目录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/104292/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com