C# – Visual studio – can’t remove project configurations

buildcconfigurationvisual studio 2010

I have a major problem with project configurations. Everything started when I wanted to add new solution configuration (named "Dev_WithSource") based on existing "Debug" configuration and checked "Create project configurations". For some reason project configurations were registered inside sln file, properly showing in Configuration manager, but "PropertyGroup Condition" blocks in csproj files weren't created. That resulted in "OutputPath not set …" error.

So, I tried to repeat whole procedure. After deleting all lines mentioning "Dev_WithSource" from sln file, "Dev_WithSource" project configurations are still showing in configuration manager. I searched all csproj and sln file in my solution. Neither of them contain text "Dev_WithSource".

After all that I event tried developing add-in. I can fetch phantom configurations with project.ConfigurationManager.ConfigurationRowNames but I also can't delete them.
Am I missing something? Are those configurations stored in some other files and not csproj/sln?

Thanks.

Best Answer

  1. Access the configuration manager in one of two ways:

    1. From the menus on top: Build > Configuration Manager...
    2. From the drop down listing your configurations on the main tool bar select Configuration Manager...
  2. In the configuration manager dialog under Active solution configuration: choose <Edit...> from the drop down.

    Configuration Manager

  3. A dialog opens showing all the configurations for your solution. Here you can select and click the Remove button.

    Edit Solution Configurations