Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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:

enter image description here

like image 848
Anton Kalcik Avatar asked Feb 01 '11 12:02

Anton Kalcik


1 Answers

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

like image 53
chaliasos Avatar answered Oct 17 '22 12:10

chaliasos