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

Custom solution configurations don't work with NuGet packages #10489

Closed
karikera opened this issue Jan 27, 2021 · 2 comments
Closed

Custom solution configurations don't work with NuGet packages #10489

karikera opened this issue Jan 27, 2021 · 2 comments
Labels
Resolution:ByDesign This issue appears to be ByDesign Resolution:Duplicate This issue appears to be a Duplicate of another issue Style:PackageReference Type:Feature

Comments

@karikera
Copy link

Details about Problem

NuGet product used Visual Studio: Visual Studio

Product version: 5.8.1

Custom solution configurations don't work with NuGet packages.
I guess NuGet needs the mapper for custom configuration names in the user project.

Repro steps and/or sample project

Use the NuGet package with custom configuration names
ex) debug_static/release_static instead of Debug/Release

@nkolev92
Copy link
Member

nkolev92 commented Feb 4, 2021

Duplicate of #5895.

At this point we don't recommend conditions based on the configuration, and the recommended way of conditioning PackageReference are TargetFramework.

Given that the reasons for this are technical(has to do with how MSBuild works) there are workarounds you can consider, by using Choose\When. Note that there's no tooling support for this.

@nkolev92 nkolev92 added Resolution:ByDesign This issue appears to be ByDesign Resolution:Duplicate This issue appears to be a Duplicate of another issue Style:PackageReference Type:Feature labels Feb 4, 2021
@zkat
Copy link
Contributor

zkat commented Feb 8, 2021

Closing as duplicate.

@zkat zkat closed this as completed Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution:ByDesign This issue appears to be ByDesign Resolution:Duplicate This issue appears to be a Duplicate of another issue Style:PackageReference Type:Feature
Projects
None yet
Development

No branches or pull requests

3 participants