Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS 2015 Publish Build Artifacts in one directory

We have just upgraded from TFS 2010 to TFS 2015 and I'm recreating a XAML-Build-Definition in the "vNext" build/workflow-format.

In the old Build it was possible to output all files (the DLLs) flat in one single directory, without their original directory structure.

Is this still possible with the new TFS 2015 Build framework?

I have the following Publish Build Artifact-Settings:

Artifact Type: File Share

Path: \\server\tfslib\$(Build.DefinitionName)\$(Build.DefinitionName)_$(Build.BuildNumber)

The problem is that the original solution directory structure is preserved in the output directory specified in Path. How can I get the output without the whole subtree?

As a workaround I'm currently doing this with a Powershell step after the Publish Build Artifact but it would be nice to do this during the publishing process itself.

like image 611
ovm Avatar asked Jan 18 '16 10:01

ovm


People also ask

Is it possible to copy build artifact from pipeline into repo?

Unfortunately, it is not possible to pass build artifacts from one Pipeline to another as it is only intended to work for steps.

What are build artifacts?

Build artifacts are files produced by a build. Typically, these include distribution packages, WAR files, reports, log files, and so on. When creating a build configuration, you specify the paths to the artifacts of your build on the Configuring General Settings page.

What are build artifacts Azure DevOps?

Azure Artifacts enable developers to consume and publish different types of packages to Artifacts feeds and public registries such as NuGet.org and npmjs.com.


2 Answers

Also please try giving this MSBuild argument

 /p:GenerateProjectSpecificOutputFolder=true /p:OutDirWasSpecified=true
 /p:OutputPath=$(Build.BinariesDirectory)
like image 64
Dilaksha A Avatar answered Oct 12 '22 23:10

Dilaksha A


You can use the "Copy File" task and specify the Source Folder in it to achieve this feature. See this question for details: Copy one file in target directory on deploy from visual studio team services

like image 26
Eddie Chen - MSFT Avatar answered Oct 13 '22 00:10

Eddie Chen - MSFT