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.
Right-click on the project node in Solution Explorer and select Properties. Expand the Build section, and select the Output subsection. Find the Base output path for C#, and type in the path to generate output to (absolute or relative to the root project directory), or choose Browse to browse to that folder instead.
The obj folder holds object, or intermediate, files, which are compiled binary files that haven't been linked yet. They're essentially fragments that will be combined to produce the final executable. The compiler generates one object file for each source file, and those files are placed into the obj folder.
Delete bin and obj foldersThe bin and obj folders are usually safe to delete since they are automatically generated when the solution/project is being build by Visual Studio/MSBuild. This feature is off by default, but can easily be enabled in the settings.
The simplest way of doing it is by adding the desired folder to your project and the exe file on the folder. Change the properties of the exe file to "Content" and "Copy always". By doing that, everytime you rebuild your solution, the output will have the folder and exe file.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With