Current solution contains incorrect configuration mappings

Viewed 652

I get this error in VS:

Current solution contains incorrect configuration mappings. It may cause projects to not work correctly. Open the Configuration Manager to fix them.

I then open Configuration Manager, and click on Close and the error goes away.

I can then see it made these changes to my .sln file:

enter image description here

Why were the original configuration mappings incorrect?

2 Answers

In my case, it was because the .csproj file had the wrong profiles compared to the global profiles.

Ensure that the tag has the correct value. You'll probably find in said project something like:

<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

It should look like

<Configuration Condition=" '$(Configuration)' == '' ">Debug_VSTS</Configuration>

In my case, it appears as a message bar on top of my code pages in VS, when I clicked on it, it opened the Build Configuration and as soon as I closed it, the message disappeared.

Related