Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rename Visual Studio Solution Configurations?

I have a VB project which I'm trying to configure with three build configurations.

I've successfully created the build configurations, but I decided the names I was using weren't descriptive enough so I went to Configuration Manager -> <Edit...> -> Rename and renamed them.

This renamed the configurations in the Configuration Manager.

I then went to do some conditional compilation testing using #If CONFIG = but it failed.

Checking deeper, it turns out that the values returned by CONFIG are the original names not the new names.

Checking My Project -> Compile -> Configuration I can see that the names shown in that ComboBox are also the old names.

So, even though I have "renamed" my configurations in Configuration Manager, they're not being renamed on all levels.

I can get around this by recreating these configurations with their intended names but that's about as bass ackwards a solution as I can think of. Is there some method of renaming configurations that actually works or is this just the way MS intended this to... "work"?

like image 863
Frosty840 Avatar asked Apr 02 '12 11:04

Frosty840


1 Answers

I think you have renamed only the Solution Configuration and not the individual Project Configuration.

Reopen the Configuration Manager and check, on every project line, the name of the configuration.
By the way, I agree with you. MS could have done better here.

For example, when you create a new solution configuration, you have the option to create the corresponding configuration on the projects. When you rename a configuration this option is missing. It's an inconsistency from MS

like image 125
Steve Avatar answered Oct 13 '22 01:10

Steve