Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Referencing NETStandard.Library 2.0.0 in net461-net47 project and only using ns1.4 (or lower) libs doesn't work #503

Closed
ericstj opened this issue Sep 21, 2017 · 4 comments
Labels
bug packaging Applied to issues with NuGet packages.

Comments

@ericstj
Copy link
Member

ericstj commented Sep 21, 2017

NETStandard.Library 2.0.0 package doesn't install netstandard1.x packages in net461-net47 projects. This is because we expected the support package to always be present on net461 and later, but when that support was implemented we dialed it back to only turn on when a netstandard1.5 or later library was referenced.

As a result installing a netstandard1.0-1.4 library in a net461-47 project and referencing NETStandard.Library 2.0.0 package will have missing dependencies.

One workaround is to use the NETStandard.Library 1.6.1 package instead. This still has the dependencies on the individual library packages to bring in the facades.

An alternative workaround is to set ImplicitlyExpandNETStandardFacades=true in the project file. This will enable all the facades for ns2.0 assemblies.

@terrajobst terrajobst added the packaging Applied to issues with NuGet packages. label Oct 18, 2018
@terrajobst
Copy link
Member

What is this issue tracking? It sounds to me as the right fix is adding a NuGet feature to allow selecting a specific asset from a package.

@ericstj
Copy link
Member Author

ericstj commented Mar 14, 2019

@terrajobst I suspect this is still an issue.

I believe if you use a netstandard1.4 based lib on net461 and reference NETStandard.Library 2.0.0 you'll be missing any of the OOB libraries.

Perhaps a better home is the .NET SDK since they implement the facade inclusion?

@terrajobst
Copy link
Member

Intersting, I think we'll need to chat in person because I'm not sure I fully understand this issue and the ramifications.

@wtgodbe wtgodbe added this to the .NET Standard vNext milestone Jun 21, 2019
@terrajobst terrajobst added the bug label Aug 18, 2022
@terrajobst
Copy link
Member

We decided to close this issue as won't fix.

First, we don't believe customers are likely to hit this. And in the rare event that they do, the workaround is to set ImplicitlyExpandNETStandardFacades to true in the application project.

@terrajobst terrajobst closed this as not planned Won't fix, can't repro, duplicate, stale Sep 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug packaging Applied to issues with NuGet packages.
Projects
None yet
Development

No branches or pull requests

3 participants