I'm working on a solution with multiple projects (class libraries, interop, web application, etc) in VS2010.
For the web application, I would like to take advantage of the config transformations in VS2010, so at one point I added configurations for each of our environments: Development, Test, Production, and so on.
Some time later, after having rearranged the project layout, I noticed that some projects show all of the configurations in the properties page dropdown. Some projects (added since I did that setup) show only the standard Debug & Release configurations. Once I realized that this was going to make build configurations worse, not better, I decided to remove all of the extra configurations I had added.
I've removed all of the various configuration options from the solution, but the projects that had the alternate configuration options still have them, and I can't figure out how to get rid of them in individual projects.
Also, now that I see that not all projects have to have the same configurations, I would like to create my environmental configurations at the solution level, and in the web application project (for the config transforms), but leave all of the class libraries with the basic Debug/Release configurations. I've been unable to find any tool in the UI, or any information on the 'Net, concerning how to set up such a thing.
So, in short, what's the best/easiest way to manage configurations at the project level in VS2010?
You can use the Configuration Manager dialog box to select or modify existing build configurations, or to create new ones. To open the Configuration Manager dialog box, in Solution Explorer, right-click on the solution node to open the shortcut menu for the solution, and then choose Configuration Manager.
Right-click on the project node and select Options. You can also double-click on the project node to bring up the Project Options dialog. Select Add to create a new configuration. You can also copy any of the existing configurations.
settings is located in the My Project folder for Visual Basic projects and in the Properties folder for Visual C# projects. The Project Designer then searches for other settings files in the project's root folder. Therefore, you should put your custom settings file there.
In the configuration manager screen, at the top, you'll see the solution configuration and solution platform. Each solution configuration is essentially a set of project configurations.
There is no "global everything" configuration because different technologies have different configuration options. How do you map a C# project's configuration to a C++ project, e.g.? This is why configurations are defined and maintained at the project level.
The right way to do it then is what you were doing. One of the administrative overheads of adding a new project to your solution is copying those project configurations in the new project and then configuring it appropriately in the solution configurations via the Configuration Manager screen.
To address your specific question, you can remove an existing project configuration from the Configuration Manager. On the project you want to modify, click the Configuration drop down, select Edit, and in the "Edit Project Configurations" dialog, select the configuration you want to remove and then click the "Remove" button.
You can do everything from the Configuration Manager dialog, accessed from Visual Studio's main menu via Build > Configuration Manager...
See also How to: Create and Edit Configurations
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