Why is my Configuration Manager empty in Visual Studio?

Recently, on several solutions that I have been working on, the Configuration Manager dialog box shows empty fields for “Configuration” and “Platform”, and “Build” is always not checked. Changing the values ​​and saving the configuration does not resolve the issue.

This does not happen on all solutions (when creating a new one, for example, this problem does not arise). Why can this happen, and how can I fix it?

Screenshot (censorship of projects): Configuration manager

+6
source share
2 answers

I had the same problem (adding an Oracle database project to my solution).

To fix the problem, you must edit the solution file (.sln). Find the Oracle Database project (find oradbproj). You should find something like this:

Project("{218574D1-FF94-4B95-8577-A6D58C11C315}") = "MyOracleDatabase", "MyOracleDatabase\MyOracleDatabase.oradbproj", "{41823BBF-36F6-42AC-9C41-119241BAAFEC}" EndProject 

Later in the same .sln file, find the beginning of the section "GlobalSection (ProjectConfigurationPlatforms) = postSolution" . There would be many entries like these:

 {CE85B8BD-1BCF-468C-AA0B-B869B87A66D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CE85B8BD-1BCF-468C-AA0B-B869B87A66D5}.Debug|Any CPU.Build.0 = Debug|Any CPU {CE85B8BD-1BCF-468C-AA0B-B869B87A66D5}.Release|Any CPU.ActiveCfg = Release|Any CPU {CE85B8BD-1BCF-468C-AA0B-B869B87A66D5}.Release|Any CPU.Build.0 = Release|Any CPU 

Copy them by replacing the GUID with the second in the oradbproj line of the previous line ({41823BBF-36F6-42AC-9C41-119241BAAFEC} in the previous example):

 {CE85B8BD-1BCF-468C-AA0B-B869B87A66D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CE85B8BD-1BCF-468C-AA0B-B869B87A66D5}.Debug|Any CPU.Build.0 = Debug|Any CPU {CE85B8BD-1BCF-468C-AA0B-B869B87A66D5}.Release|Any CPU.ActiveCfg = Release|Any CPU {CE85B8BD-1BCF-468C-AA0B-B869B87A66D5}.Release|Any CPU.Build.0 = Release|Any CPU {41823BBF-36F6-42AC-9C41-119241BAAFEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {41823BBF-36F6-42AC-9C41-119241BAAFEC}.Debug|Any CPU.Build.0 = Debug|Any CPU {41823BBF-36F6-42AC-9C41-119241BAAFEC}.Release|Any CPU.ActiveCfg = Release|Any CPU {41823BBF-36F6-42AC-9C41-119241BAAFEC}.Release|Any CPU.Build.0 = Release|Any CPU 

Now you can save the .sln file. If you edited the .sln file outside of Visual Studio, opening it, returning to Visual Studio, it will ask you to restart the solution. Click "Yes" and wait. I.e!!!

+4
source

After he reached it longer than Id to admit, Ive discovered that the culprit is the Oracle database project (.oradbproj). Apparently, when it was added to the solution, Visual Studio did not create a mapping between the solution configurations and the project configuration for the database project. Adding mappings manually seems to fix the problem. I copied the mappings from another project (in the ProjectConfigurationPlatforms section of the Solution file), and then replaced the GUID with the one that corresponds to the database project. After making changes, saving and reopening the solution, everything looks good!

+3
source

Source: https://habr.com/ru/post/922288/


All Articles