【发布时间】:2010-09-11 09:11:37
【问题描述】:
尝试使用 Team Foundation Build 构建我的应用时出现以下错误:
C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1682,9):错误 MSB3554:无法写入输出文件“obj\Release\Company.Redacted.BlahBlah.Localization .子系统。 Startup_Shutdown_Processing.StartupShutdownProcessingMessages.de.resources”。指定的路径、文件名或两者都太长。完全限定的文件名必须小于 260 个字符,目录名必须小于 248 个字符。
我的项目在我的开发机器上构建良好,因为源代码只有两个文件夹深,但 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>
如果这是存储在数据库中,我该如何更改它?
编辑: 发现以下博客文章可能会指向我的解决方案。现在我只需要弄清楚如何更改 Build Agent 中的设置。 http://blogs.msdn.com/jpricket/archive/2007/04/30/build-type-builddirectorypath-build-agent-working-directory.aspx
目前我的工作目录是“$(Temp)\$(BuildDefinitionPath)”,但现在我不知道有哪些通配符可用于指定不同的文件夹。
【问题讨论】: