Search code examples
c#visual-studio-2010configurationbuild

Visual studio - can't remove project configurations



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.


Solution

  • I solved this with utility which parses csproj files and inserts necessary propertygroup blocks into csproj files. Old project configurations still appear in configuration manager but I gave up trying to delete them.