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

  

C:\ WINDOWS \ Microsoft.NET \ Framework \ v3.5 \ Microsoft.Common.targets(1682,9):错误MSB3554:无法写入输出文件“obj \ Release \ Company.Redacted.BlahBlah。 Localization.Subsystems。   Startup_Shutdown_Processing.StartupShutdownProcessingMessages.de.resources&QUOT ;.指定的路径,文件名或两者都太长。完全限定的文件名必须少于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)”。但现在我不知道哪些通配符可用于指定不同的文件夹。

有帮助吗?

解决方案

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

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

祝你好运,

马丁。

其他提示

您必须从源代码管理资源管理器中签出构建脚本文件,并让您的肘部变脏以替换路径。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top