Question

So, I'm new to TFS build definitions - and the RA team at my company asked how to deploy a project that I built. In this case, a Windows Service project.

When I compile from Visual Studio, the "bin" directory has all the files I need... including copying a ".bat" file that is set to "copy local".

Anyway, the last step of the default "Build Definition" is "Run MSBuild for Project"... but that seems to just stick every DLL in the entire solution into an output directory.

Am I missing something? ... how do I get the build to:

  1. Only build a single project - not the entire solution.
  2. Put all the files that would be in the "bin" directory into the output directory.
Was it helpful?

Solution

When you're editing the Build Definition you can specify just a single project if you wish. By default TFS Build should put everything in the Build Drop that you typically find in your bin directory.

enter image description here

If you find the build is missing files that you expect to be there consult the MSBuild log that you can find linked from the TFS Build log. You can also run the TFS Build with Verbosity=Diagnostic when you queue up a build, which will cause the MSBuild log to contain much more detail.

OTHER TIPS

Dylan Smith's answer was correct, and got me 90% there... the was a strange bug that some quick Googling found here: http://social.msdn.microsoft.com/Forums/uk/tfsbuild/thread/990fdd96-69bc-4e99-be0e-acc0874e022f

So, the solution is:

  1. Do what Dylan said (pick the csproj file).
  2. Remove the "Any CPU" part of the build... just target "Release" or "Debug" or whatever.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top