Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio solutions - how to ensure project properties are shared?

If you use Visual Studio 2008 and have many project files within solutions how do you keep them in sync? In other words, if you change a property in one project, how do you ensure that this property is automatically changed in other projects?

like image 587
fooMonster Avatar asked Jan 05 '09 19:01

fooMonster


1 Answers

Given that enough contributors are mystified about the notion of nested solutions, I'll just work from the assumption you meant "solution with multiple projects". You give them common settings by using a project property sheet. Start with View + Other Windows + Property Manager. Open one of the nodes, right-click a configuration and choose Add New. Choose a location that makes sense for the solution, the solution directory for example. Configure the settings the way you want them.

Repeat this procedure for all other projects in your solution, now using Add Existing. Every project will inherit the settings you configured in the sheet, unless it overrides them explicitly. You may have to go back to the project properties and change an override back to "inherit".

IDE support for project property sheets is a bit flaky, be sure to save them explicitly when you make a change.

like image 137
Hans Passant Avatar answered Dec 18 '22 22:12

Hans Passant