How generate _PublishedWebsites folder in Builds vnext

In TFS 2013 Xaml build and Msbuild we have the possibility to generate a folder _PublishedWebsites that contain the files result for the web project compilation.

_publishedWebSites

In new build system Vnext build for TFS 2015 and VSTS, for generate this folder during build compilation, into Visual Studio Build (or MSbuild) Task, add MsBuild Argument  /p:outdir with the destination of the compilation ouput, for example : /p:outdir=$(Build.BinariesDirectory)

msbuild Arguments

After the build execution, we can see the _publishedWebsites folder in the specified directory

publishedWebSites 2

The next step is to publish into artifacts only the content of the _Publishedwebsites directory for deploy it with Release tool.

For this, configure the Copy Publish artifact task for publish only the content of _Publishedwebsites folder

copyArtifacts

And result of the published artifact

artifacts

If the solution contain multiple web projects 1 directory by web site is created under _PublishedWebsites folder.

multi websites

We get the web site content and it ready to be deployed.

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *