当CreatePackageOnPublish设置为true时,TFS Team Build中的长路径问题. [英] Problems with long path in TFS Team Build when CreatePackageOnPublish is set to true.

查看:77
本文介绍了当CreatePackageOnPublish设置为true时,TFS Team Build中的长路径问题.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于参数 CreatePackageOnPublish 设置为 true 时,TFS团队构建会创建长路径,因此我们在构建时遇到问题.

We have a problem by build because of long path created by TFS Team Build when parameter CreatePackageOnPublish is set to true.

在目录 PackageTmp (请参见图片)中存储了软件包,但是我不明白为什么需要此目录结构以及如何对其进行自定义.

In directory PackageTmp (see picture later) the package is stored, but I don't understand why this directory structure is necessary and how it can be customized.

问题是部署或新的TFS构建由于路径过长而产生错误.

The problem is that the deployment or new TFS build generates error because of long path.

感谢您的帮助.

致谢

安东·卡尔奇克(Anton Kalcik)

Anton Kalcik

这是由TFS Team Build创建的(匿名)树结构:

This is the (anonymised) tree structure created by TFS Team Build:

推荐答案

一个简单的解决方法是将'PackageTmp'文件夹创建为.zip文件.为此,请在VS中右键单击您的项目,然后选择打包/发布设置" .在"Web部署程序包设置" 中,勾选将部署程序包创建为.zip文件" .

An easy workaround is to create the 'PackageTmp' folder as a .zip file. To do so right-click on your Project from VS and select 'Package/Publish Settings'. In the 'Web Deployment Package Settings' tick the 'Create deployment package as a .zip file'.


另一个解决方法是在运行Tfs构建的命令上添加以下参数:


Another workaround is to add the following parameter on your command that runs on Tfs build:

MSBuild.exe WebProjectName.cs /p:Configuration="Release";DeployOnBuild=true;DeployTarget=Package; _PackageTempDir=C:\Package

_PackageTempDir = C:\ Package 将创建以下输出路径:

The _PackageTempDir=C:\Package will create the following output path:

.. \ WebProjectName_Package \ Archive \ Content \ C_C \ Package \ ..

..\WebProjectName_Package\Archive\Content\C_C\Package\..

这篇关于当CreatePackageOnPublish设置为true时,TFS Team Build中的长路径问题.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆