Problems with long path in TFS Team Build when CreatePackageOnPublish is set to true.

时光怂恿深爱的人放手 提交于 2019-12-05 23:55:37

问题


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

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.

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

I will be grateful for your help.

Regards

Anton Kalcik

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


回答1:


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'.


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

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

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



来源:https://stackoverflow.com/questions/4862339/problems-with-long-path-in-tfs-team-build-when-createpackageonpublish-is-set-to

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!