Take the 2-minute tour ×

Our build server has been using the following properties for some time


Which make all output go to a common folder, and also allow resolving references for that same folder. This works great because

  1. it's an optimization over building locally and copying references locally
  2. I need all my dll's in a common folder anyways so I can zip and ship

Since this is working great on the build box, I would like to bring the same experience to our developers. I want our IDE builds to behave the same way.

In other words, I want the work flows our developers always use (build solution, build project) to behave just like I described happens on the build box.

I could easily accomplish this if I asked the team to create an VS.Net external tool to a batch file that just calls msbuild on the selected project with the desired properties. But ideally they wouldn't have to change their workflow.

I want to know

  • if anybody else is doing this?
  • what is the best way to do it?
  • do I need to edit every single csproj file or use an external tool or batch file


share|improve this question

2 Answers 2

You need the OutDir and ReferencePath both set, for the projects to send their output to OutDir and for them to resolve references from the same path. You could add a common targets file with:

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">

Put this in a foo.targets file, and import that in every project.

share|improve this answer

We are doing the same. Editing every csproj file. Quite a lot of plumbing but it works.

If possible - try to reduce count of assemblies to minimum.

Edits needed for Csproj:

  <ProjectReference Include="..\Core\Core.csproj">

Should become as regular reference:

<Reference Include="Core, Version=, Culture=neutral,  

Although - relative path to deploy folder should be defined as property.

But i'm not a build guru. Just sharing some info. :)

share|improve this answer
Could you provide an example of what you're editing everytime? Could I do a bulk search & replace using grepWin for existing projects, then make a new project template? I have > 500 projects so I have a high upkeep. –  Ryu Oct 8 '09 at 7:32
Oh my god... 500 projects. Then this might be not an option. Search&Replace tool would need to be too sophisticated. –  Arnis L. Oct 8 '09 at 8:28

Your Answer


