Question

I have a solution which contains a number of 2 windows console projects, 1 website project and 20 class libraries.

I want TFS 2013 to push to the drop folder only the windows console and website projects to the drop folder.

I am looking for a folder structure similar to below.

DropFolder
    - App1
    - App2
    - Website1

How is the best way to configure TFS to allow this?

Thanks

UPDATE

I have ended up using the nuget package http://www.nuget.org/packages/PublishedApplications for all the projects that I want to be published. This copies the projects into a _PublishedApplications folder. So that I have a folder structure like this

DropFolder
    _PublishedApplications
        - App1
        - App2
    _PublishedWebsites
        - Website1
Was it helpful?

Solution

  • The default template has Solution Specific Build Outputs property under Process tab Advanced section. Solution Specific Build Outputs

  • Alternatively you can let MSBuild control your build flow.

Update:

OTHER TIPS

I've used PublishedApplications NuGet package as well, but have encountered an issue. If referenced libraries had Content marked as Copy Always all content would be copied to the root folder and not hierarchically. For example if you have following projects and structure (some files omitted for brevity):

PublishLib
    test
        TextFile1.txt (marked as Content/CopyAlways)

TestPublishTargetApp - references PublishLib
    targets
        Microsoft.Application.targets

When team build is done this is the content of _PublishedApplications\TestPublishTargetApp folder:

PublishLib.dll
TestPublishTargetApp.exe
TestPublishTargetApp.exe.config
TestPublishTargetApp.pdb
TextFile1.txt

And what I expected was:

test\TextFile1.txt
PublishLib.dll
TestPublishTargetApp.exe
TestPublishTargetApp.exe.config
TestPublishTargetApp.pdb

After fiddling around a bit with Microsoft.Application.targets I was able to get what I wanted by changing last <Copy SourceFiles (original commented out):

    <!--<Copy SourceFiles="@(_SourceItemsToCopyToOutputDirectoryAlways)"
      DestinationFolder="$(ExeProjectOutputDir)"
      SkipUnchangedFiles="false"
      Retries="$(CopyRetryCount)"
      RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>-->

    <Copy SourceFiles="@(_SourceItemsToCopyToOutputDirectoryAlways)"
      DestinationFiles = "@(_SourceItemsToCopyToOutputDirectoryAlways->'$(ExeProjectOutputDir)\%(TargetPath)')"
      SkipUnchangedFiles="false"
      Retries="$(CopyRetryCount)"
      RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"/>

I am not sure if this is useful to anyone else, but for me this was essential change, plus PublishedApplications NuGet package was not changed since 2014 (seems like abandoned project).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top