Question

Current solution contains incorrect configuration mappings

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?

 46  18972  46
1 Jan 1970

Solution

 81

It's not uncommon that shared projects get included in the list of projects to build. Not sure it applies to all cases but clearing everything between:

GlobalSection(ProjectConfigurationPlatforms) = postSolution

and

EndGlobalSection

in the .sln file and then reloading the solution will at least solve those.

2022-11-08

Solution

 81

It's not uncommon that shared projects get included in the list of projects to build. Not sure it applies to all cases but clearing everything between:

GlobalSection(ProjectConfigurationPlatforms) = postSolution

and

EndGlobalSection

in the .sln file and then reloading the solution will at least solve those.

2022-11-08

Solution

 6

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>
2022-07-22

Solution

 6

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>
2022-07-22