3

I have a drop folder created by TFS build which contains all the produced artifacts:

  • .dll \ .config \ .pdb files from all projects
  • _PublishedWebsites folder
  • *.msi files produces by Wix projects

All I really care about is *.msi files as everything I deploy is in them.
How can I specify for the TFS build not to bother with all the other files in the Drop folder?
I know I can customize the build to delete files after the solution build, but maybe there is a clever way of disabling them at all?

  • 1
    don't build with a drop folder, just have a share and copy your MSi to there. – Just TFS Sep 17 '14 at 12:41
  • That's an idea. However I plan to have Lab deployment build as the next step relying on the drop folder from this Build step. –  Sep 17 '14 at 12:54
  • set your lab to pick up the artefacts from the drop location (shared folder), you just need to aletr the template – Just TFS Sep 17 '14 at 13:05
  • What happens if 2 builds run at the same time and try to write to the same network share? Also, what if I want to deploy a specific build to a Lab env? (manually: Queue new build > Parameters > Lab Process Settings) –  Sep 17 '14 at 13:29
  • thats why i still use the drop folder ;-) it's already versioned so you don't have to worry about it. Having the rest of the output there in the drop folder will help you with debugging in the long run, should anything not get included in your MSI, you can easily see if it was in the build output and can figure out why it wasn't included – Just TFS Sep 17 '14 at 13:40
  • Agree with debugging purpose... I'll leave it as it is for now... and will come back here if I get new thoughts... Thanks, Just TFS! –  Sep 17 '14 at 13:54

2 Answers2

1

Personally I use named platforms such as Application and Setup in my SLNs so that when TFS archives the drop folder one class of files goes into one directory structure and another class of files goes into another. This way it's easy to find the MSI and it's also easy to see what the application code looked like before then. (Perhaps the contents of a web.config or an HTML that was added to the application sln but not the installer sln.

IF you want to suppress the application sln from archiving you have to look at that. It's not an MSI / WiX thing.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • Although this doesn't answer the question, thanks anyway for the interesting thoughts! My main goal is to get rid of "Application" files completely as files drop folder is used later for Lab deployments and I just don't see any point in tossing around with those files. –  Sep 17 '14 at 18:11
  • I suppose you could create a CleanOutDir.proj and have it delete all files in $(OutDir) (BinariesRoot) except for *.msi at the end of the compile. I think the workflow would then have less to archive. – Christopher Painter Sep 17 '14 at 18:26
  • Yes, that's one idea that will definitely work! Right now I'm studying Microsoft.Common[.CurrentVersion].targets to see if I can even switch off copying specific files\projects to the $(OutDir) –  Sep 18 '14 at 08:22
0

If you are using TFS 2013 (or VSO) you can easily have a PowerShell executed post build to do whatever clean up and rearranging you need.

Note: The build used the files in the root to do testing, code analysis, test impact analysis, and other automatic actions. Make sure that you only remove files after all of the checks. A better idea is to leave the files be and just push theb*.msi files to a "/_PublishedApplications/* folder.

There is a PublishedApplication Nuget package that can make this easyer. Take a look...

If you are using TFS 2010/2012 you can use the "TFS Community Build Tools" to call PowerShell and do other things.