How to output projects to different directories when a solution is built?

27 views Asked by At

I have multiple solutions and in those solutions there are multiple projects. when I build the the solutions they go to a common directory. I want 2 projects in one of the solutions to output to a different sub-directory and all other projects to the common directory.

How can I do this?

1

There are 1 answers

0
jessehouwing On

You'll need to set the "Output Location" to "AsConfigured", which will put the files in the standard folder which is defined in the project files (defaults to the bin\$(Configuration) under the project folder.

You'd then need to call a post-build script (you can create a powershell script and check it into source control) which copies all the files to the output location.

This is explained in this topic on MSDN. An example script is shown on this page. It can be downloaded here.