All binaries from TFS build in nuget package

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.

Thanks Jack,

I’m looking into this at the moment:

https://trello.com/card/octopack-tfs-too-many-files-in-outdir/4e907de70880ba000079b75c/183

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

Paul

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:

http://blogs.microsoft.co.il/blogs/royrose/archive/2010/07/11/team-build-2010-build-each-project-to-a-separate-directory.aspx

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.

DefaultTemplateOctopusDeploy.xaml (61 KB)

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:

http://www.nuget.org/packages/PublishedApplications

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)

Paul

Thanks for PublishedApplications package reference.
I’ve installed the package: http://www.nuget.org/packages/PublishedApplications for each Executable in My Solution and it created subfolders for each project.

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

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.

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

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.

Cheers,

Dalmiro