0
votes

In the build definition, I have those parameters in the msbuild arguments: /p:DeployOnBuild=true /p:WebPublishMethod=FileSystem /p:PackageLocation=$(build.stagingDirectory)\DeployPackages\ /p:PackageAsSingleFile=false /p:SkipInvalidConfigurations=true /p:AutoParameterizationWebConfigConnectionStrings=False /p:GenerateProjectSpecificOutputFolder=true

All the files required are place in the DeployPackages folder, but list of folder and subfolder to get to the code is to big. Is there a way to reduce the number of folders? _work\5\a\DeployPackages\Archive\Content\d_C\tfsbuild_work\5\s\Main\AdService\obj\DEVE\Package\PackageTmp\

and it's the PackageTmp folder that contains the file I need to copy to our server.

thanks

2
Which build are you using ? XAML or Vnext build?PatrickLu-MSFT

2 Answers

0
votes

You can use this arguments:

/p:outdir="$(build.artifactstagingdirectory)\DeployPackages"
0
votes

Update

To reduce the folder path and structure you could use other argument instead of $(build.stagingDirectory) in package location. Such as

/p:PackageLocation="$(BuildConfiguration)"\DeployPackages\XX.zip

or

/p:PackageLocation="$(build.artifactstagingdirectory)\DeployPackages\XX.zip

Besides if you got any long path issue, the most effective and easy way still is spending some time tweaking your file/folder structure.

For example: instead of \xx\Build\Drop\ProjectName, just use \xx\Build\Drop (or \xx\Builds) since the project name is also in the build name.