2
votes

I have MyProj.proj file that I use as 'Projects To Build' in my tfs build configuration.

C++, C# and VB.Net solutions are listed in MyProj.proj. Each solution has the same output directory - Bin folder (C:\Builds...\MyProject\Bin), so all build artifacts (dlls, exe files, ..) are placed there after successful build.

I want to copy C:\Builds...\MyProject\Bin to the drop folder on other box when tfs build finishes successfully. For this purpose I checked Copy build output to the following drop folder checkbox and specified UNC path \\OtherBoxFromMyNetwork\BuildArtifacts

But it doesn't work for me. I see that folder with name according to build number was created in a drop folder: \OtherBoxFromMyNetwork\BuildArtifacts\MyProject\Build_Number , but it contains only logs folder, so Bin directory wasn't copied. Why?

1

1 Answers

0
votes

TFS Build overrides the OutputPath MSBuild property (that C# and other projects have by default). This forces the outputs to go into a different directory on the TFS Build Server, and it's this directory that gets copied to the Build Drops. The folder structure in the build server working directory is something like this:

C:\Builds\1\TeamProjectName\BuildName\src\
C:\Builds\1\TeamProjectName\BuildName\bin\

Your code and proj and sln files will be under the \src\ folder, but TFS Build redirects all output to the bin folder which is copied to the Build Drops at the end. Note: The bin folder is not in the same location as the typical bin\debug folder.