Packaging Windows Service in TFS

Hi,

I have a solution with mutliple web sites & WCF services and been using Octopus for a while to package\deploy - all works great.

We’ve just added a windows service project. I added all the usual bits to the project and I get a nuget package out of the end but when I looked in the package it actually contained ALL of solution artefacts output by TFS, it basically looks like a copy of the entire TFS output folder including all dll’s and the PublishedWebsites folder.

The deploy.ps1 is the correct one for the windows service and the required dll’s should all be in the root (as it contains everything) so it should be deployable. I’ll confirm this. BUT this makes the package a real mess as it contains a load of stuff I don’t want and makes it very large.

I am not sure exactly whats happening here as I am no Octopus or TFS expert. Others seem to be having no problem with building windows services but perhaps their solutions are single service? I suspect it is a combination of issues around these two things. So I probably have two questions for the wise:

  1. Why is this happening?
  2. What are my options for cleaning up the package? I’m slightly worried I may have to resort to build script changes, if so some pointers would be very helpful.

Thanks, Ben.

Hi Ben,

TFS by default overrides the output directory of all projects such that every single output artifact ends up in the same place. On recent versions of TFS you can override this, which should help:

Paul