Mihail Shishkov
Mihail Shishkov

Reputation: 15807

Configure a global output bin/obj folder for every project in a Visual Studio 2012 solution

I know that it is possible to configure the output folder per project. What I need is a way to globaly set the output folders for every project in a solution so that when new projects are added they will automatically output to the specified folder.

The best output folder structure should be something like that:

SolutionFolder
    |-Project1
    |-Project2
    |-Project3
    |
    |-Release
    |    |-bin
    |    |  |-Project1
    |    |  |-Project2
    |    |  |-Project3
    |    |-obj
    |    |  |-Project1
    |    |  |-Project2
    |    |  |-Project3
    |-Debug
    |   |-> "same structure for the debug folder"
    |-mysolution.sln 

Is this possible and if yes where to look for more info? Thank you.

Upvotes: 9

Views: 615

Answers (2)

Kamil
Kamil

Reputation: 13931

For non C++ projects/solutions you can use Visual Studio Templates. I don't know how to do it, but im almost sure that you can do it with VS Templates.

More information: Visual Studio Templates at MSDN

For C++ there is a tool, called "Property Manager". You can show this tool by clicking View->Other windows->Property Manager.

Property Manager allows you to create "Property sheets", and you can set up almost everything in there. For more information just google it.

Upvotes: 3

Rico Suter
Rico Suter

Reputation: 11858

If you need this to be automatically, I think you need to have a VS extension which does this automatically... (I don't know if this exists)

Otherwise you can write a simple application which reads a .sln file (special format, but simple to parse) and updates all referenced .csproj files (XML files) with the correct output path.

Upvotes: 2

Related Questions