All binaries from TFS build in nuget package

Jack Unrau's Avatar

Jack Unrau

30 Jul, 2012 10:28 PM

Since TFS builds all binaries to the same folder, the nuspec file (without the element) takes all binaries, copies them to the NuGet-temp folder, and packages them into each nupkg file.

Is there a way to get around this? I want each packaged project, and its assembly dependencies, in a nupkg file.

  1. Support Staff 1 Posted by Paul Stovell on 01 Aug, 2012 08:48 AM

    Paul Stovell's Avatar

    Thanks Jack,

    I'm looking into this at the moment:

    I suspect it will involve workflow changes but I'll get it working in a prototype and give you an update.


  2. 2 Posted by André Bires on 01 Aug, 2012 02:08 PM

    André Bires's Avatar

    I had the same problem while testing Octopusdeploy in my company. The package created by Octopack for EXE projects contains every single file of build drop folder.
    The way I found to solve this was changing the build workflow, using the solution proposed in this article:

    The only issue is you need a separated solution for each EXE project, but in a single build definition you can build multiple solutions.

    I also personalized the build definition to call Octo.exe after the build and create a new release with lastests packages. And I have made a fork in Octo.exe project and changed it to allow passing "generic" versions numbers, described here:

    This allows to the release version automatically be incremented in every build on TFS.

  3. Support Staff 3 Posted by Paul Stovell on 01 Aug, 2012 02:19 PM

    Paul Stovell's Avatar

    Thanks for sharing your approach André.

    I just finished testing another solution that avoids modifying the workflow, and instead requires some MSBuild changes. It worked for me:

    Another option, which I haven't tried, is to install this package:

    So it sounds like there are three options:

    1) Customize the build workflow as André has done
    2) Use the MSBuild changes in Jason's post
    3) Use the PublishedApplications package (not tested but sounds like it would work)


  4. 4 Posted by michael.freidge... on 11 Dec, 2012 11:20 AM

    michael.freidgeim's Avatar

    Thanks for PublishedApplications package reference.  
    I’ve installed the  package: for each Executable in My Solution and it created subfolders for each project.

  5. 5 Posted by Max Malook on 11 Dec, 2012 07:46 PM

    Max Malook's Avatar

    I've utilized FileWrites and FileWritesShareable for collecting all files generated by the current project. I've created a pull request.

  6. 6 Posted by Jeremy Thomas on 12 Feb, 2014 11:45 PM

    Jeremy Thomas's Avatar

    I just hit this problem when i added the /maxcpucount to the msbuild params to speed things up.
    Removed the param and all good again.

    The sln contains a bunch of projects, not all related to the ASP.NET project I am using octopack with.

  7. 7 Posted by Robert Allen on 02 Sep, 2015 09:24 AM

    Robert Allen's Avatar

    We use the /p:GenerateProjectSpecificOutputFolder=true so that each project within the solution generates it's own folder. I am using TFS 2012.

  8. Support Staff 8 Posted by Dalmiro Grañas on 02 Sep, 2015 03:16 PM

    Dalmiro Grañas's Avatar

    Hi Robert,

    Thanks for reaching out. I'm not sure if that was a question or just a statement :). If need help with something please let us know in more detail.



  9. Paul Stovell closed this discussion on 04 Jan, 2017 08:50 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac