Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for GlobalSection(ProjectConfigurationPlatforms) in .sln #1828

Closed
deitry opened this issue Jun 9, 2020 · 0 comments
Closed

Support for GlobalSection(ProjectConfigurationPlatforms) in .sln #1828

deitry opened this issue Jun 9, 2020 · 0 comments

Comments

@deitry
Copy link
Contributor

deitry commented Jun 9, 2020

Assume we have a solution that includes two projects. For one of the projects there is several configurations defined, let's say Release_1, Release_2 and appropriate Debug_s while the second there has just Release and Debug.

Using the solution configuration we got such remapping in GlobalSection(ProjectConfigurationPlatforms):

{00000000-0000-0000-0000-000000000000}.Debug_1|Any CPU.ActiveCfg = Debug|Any CPU
{00000000-0000-0000-0000-000000000000}.Debug_2|Any CPU.ActiveCfg = Debug|Any CPU

Currently we build solution with either Debug_1 or Debug_2 configuration - project file contributes different properties like OutputPath, DefinedConstants and so on under conditioned property groups. Therefore I set up omnisharp.json to use one of these:

"msbuild": {
    "enabled": true,
    "Configuration": "Debug_1",
    "Platform": "Any CPU"
},

and first project is parsed perfectly by OmniSharp.

But when it comes to conditional properties in second project, conditions like '$(Configuration)' == 'Debug' are not triggered because actual configuration is Debug_1 and not Debug (checked with trace logging).

Technically this can be overcomed by separating first project into Project_1 and Project_2 or adding additional configurations to second project, or making more complicated conditionals, but is there any way to use solution configuration?

Another way to solve it is to allow override Configuration by omnisharp.json local to second project (in our case they reside in different locations).

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant