Question: When I build a solution on my build server it generates a binaries folder and then later on copies these binaries to the final output folder. In my case some of the third party assemblies REFERENCES are correctly copied over while other 3rd part assemblies REFERENCES are not copied over. Take not that my solution projects do not directly reference the assemblies being copied over. 

This means that everything build fine. But when I run my program it doesn't start since the assemblies it's referencing can't in turn load their references.

What process in the build determines what assemblies are copied over to the binaries folder? Is there any way to specify that it should copy all assemblies? 

Edit : One possible solution is to just reference all required assemblies in one of the projects in the solution but this gets very messy.

Answer: 
For ASP.NET projects there is a built in mechanism for this. Ensure required assemblies are in a folder under your project named \_bin\_deployableAssemblies and they will get automatically copied. To see how this customization is wired into the build of Web projects, find the file...

```
%PROGRAMFILES%\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets

```

And take a look at the \_CopyBinDeployableAssemblies target. In that same file you can see it referenced like this...

```
<PropertyGroup>
  <PrepareForRunDependsOn>
    $(PrepareForRunDependsOn);
    CopySilverlightApplications;
    _CopyBinDeployableAssemblies;
  </PrepareForRunDependsOn>
  ...

```

You can do a similar customization on any project, since the target PrepareForRun is part of the common MSBuild targets in Visual Studio.
Please do one thing, add the third party dlls to your bin folder and give reference to that dll in the bin folder. 

Then build the solution and commit the results. This will copy the third party dlls in the bin folder.