Once upon a time, I had a 'DEV' configuration and a 'Web.DEV.config' transformation file for my project. I then removed that particular configuration...

...Now I want it again. Problem is, when I add the configuration, then try to add the config transformation to the project, I get the following Visual Studio complaint:

A file or folder with the name 'Web.DEV.config' already exists.
Please give a unique name to the item you are adding, or delete
the existing item first.

I've checked the physical directory of the project, and there is no such file. I searched my entire solution for 'Web.DEV.config', and there are 0 results. Why the heck is Visual Studio trying so hard to kill my productivity today?

有帮助吗?

解决方案 2

The actual configuration was still lingering around....

Even though I deleted the config file, the actual configuration was still there. Once I deleted the configuration (through the configuration manager), Visual Studio was happy once again!

其他提示

Try removing your .suo file from the same folder as the sln file (it's a hidden file, you need to configure your file explorer to show hidden files). Not sure it will work but it's worth a try (beware you will lose your local user settings when you delete this file)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top