0

This is a winform application. All dlls, exe and some other extension files are copied to the StartupProject\bin through the post build events(VS post-build).

On TFS Server, the project has 2 subfolders: bin and src.(bin contains required dlls, but other extensions are missing -.png, .dat, .xslx).

On the server, the post build copied files appear under the StartupProject\bin, but they are not copied to TFSFolder\bin. How can I force copy all the StartupProj/bin to the TFSFolder\bin?

Andrei Spatar
  • 253
  • 1
  • 3
  • 10

1 Answers1

0

Team Build use a different directory layouts from Visual Studio builds. All Binaries go in a single folder for any project built, so references are automatically solved and it is easy to copy the DLL to the final Drop folder.

You should use $(OutDir) MSBuild variable to properly reference the binaries directory in VS and TFS builds. See Is there a single MSBuild and TFSBuild variable that will point to where the binaries are? for some details.

If you need to use different scripts for desktop (VS) and server (TFS) builds, use the $(BuildingInsideVisualStudio) variable as explained in TFS 2010 Build Automation and post-build event.

Community
  • 1
  • 1
Giulio Vian
  • 8,248
  • 2
  • 33
  • 41
  • The $(OutDir) solution seems to be working. However, I need to copy the files to both $(OutDir) and StartupProj. Can I do this in one step?(instead of copying to OutDir and then StartupProj?) – Andrei Spatar Jul 08 '15 at 08:23