You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add dependencies from Microsoft.NETCore.App to Microsoft.NETCore.Targets and NETStandard.Library #3574
This should be to the corresponding 3.0 version of this package
We should also remove the runtime.json file from the Microsoft.NETCore.Targets package. It contains "supports" information which is not used anymore.
NETStandard.Library version 2.0.3
This will prune the 1.x contracts from the dependency graph if they are coming from a package that has a dependency on NETStandard.Library 1.6.1 (or 1.6.0).
.NET Standard 2.1 uses a targeting pack, so we don't have a 2.1 package to depend on
We could create an "empty" 2.1 NETStandard.Library package if there's a reason to do so, but at this point I'm not sure there is
I think we should definitely make the empty netstandard 2.1 as well. Let's be consistent here in how these stubs work. I think it will be very confusing to see an actual reference to non-empty netstandard.library 2.0.x injected. It will also cause too much to be downloaded in cases with no legacy refs.
I think I'm missing some context here, why do we need to ship an empty Microsoft.NETCore.App? If we empty out NetStandard.Library, is the intention that the change will be permanent, and other repos should start consuming Microsoft.Private.Standard?
I don't know what Microsoft.Private.Standard is. NETStandard.Library.Ref is the real payload ("targeting pack"). The empty package is a way to short circuit things in nuget while we're currently lacking any other mechanism.
@nguerrera Microsoft.Private.Standard contains essentially the same bits as Netstandard.Library - I believe Core-Setup currently depends on Microsoft.Private.Standard to get the netstandard bits that it injects into the targeting pack (@dagood can you confirm?). However if we empty out Netstandard.Library, that would break other repos that depend on that package (like corefx), unless we intend for those repos to switch over to Microsoft.Private.Standard. I'm missing some information here, so I'm not sure what the motivation is for this request, or what the guidance is for repos that depend on the packages that are going to become empty.
other repos should start consuming Microsoft.Private.Standard?
I believe the near-term goal is that Core-Setup is the only place referencing dotnet/standard bits, and it does so through the Microsoft.Private.Standard transport package. That's redisted as NETStandard.Library.Ref that should be used everywhere else. (Repos may need to use a new enough SDK to be able to use NETStandard.Library.Ref?)
We're still depending on NETStandard.Library here, but it should just be a matter of changing the PackageReference:
Customers are reporting hitting this issue with the latest sdk, and don't like the manual workaround of having to add a reference to the Targets package. This is a regression, @dsplaisted do we plan to fix this for 3.0?
In case this is weighed against implementation difficulty (although so far it hasn't sounded like it), it's trivial to add workaround package dependencies, they just need to be added to this itemgroup:
For the failure to occur, there need to be dependencies to both 1.0 and 1.1 band contract packages. The Blazor package is bringing in Mono.Cecil which is bringing in 1.0 contracts such as System.IO.FileSystem 4.0.1. The GPIO package is depending on several 1.1 contracts, such as System.Runtime.InteropServices.WindowsRuntime 4.3.0.
As Nick suggests, an updated Mono.Cecil package with a .NET Standard 2.0 version of the library would fix this. Updating the GPIO package so that it doesn't depend on the contract packages should also work if that's possible.
dotnet/sdk#3044 tracks the work on the SDK to make these scenarios just work, which after trying many workarounds and failing, is now blocked on NuGet/Home#7344
Both are still open so we should focus there rather than on this workaround issue that won't work.
Please link any reports on either of those issues.
Activity
dsplaisted commentedon May 2, 2019
FYI @ericstj @nguerrera
ericstj commentedon May 2, 2019
/cc @wtgodbe on the NETStandard.Library suggestion. We may want to make an empty one. I'll submit a change to empty MS.NETCore.Targets.
nguerrera commentedon May 2, 2019
I think we should definitely make the empty netstandard 2.1 as well. Let's be consistent here in how these stubs work. I think it will be very confusing to see an actual reference to non-empty netstandard.library 2.0.x injected. It will also cause too much to be downloaded in cases with no legacy refs.
wtgodbe commentedon May 2, 2019
I think I'm missing some context here, why do we need to ship an empty
Microsoft.NETCore.App? If we empty outNetStandard.Library, is the intention that the change will be permanent, and other repos should start consumingMicrosoft.Private.Standard?nguerrera commentedon May 2, 2019
I don't know what Microsoft.Private.Standard is. NETStandard.Library.Ref is the real payload ("targeting pack"). The empty package is a way to short circuit things in nuget while we're currently lacking any other mechanism.
wtgodbe commentedon May 2, 2019
@nguerrera Microsoft.Private.Standard contains essentially the same bits as Netstandard.Library - I believe Core-Setup currently depends on Microsoft.Private.Standard to get the netstandard bits that it injects into the targeting pack (@dagood can you confirm?). However if we empty out Netstandard.Library, that would break other repos that depend on that package (like corefx), unless we intend for those repos to switch over to Microsoft.Private.Standard. I'm missing some information here, so I'm not sure what the motivation is for this request, or what the guidance is for repos that depend on the packages that are going to become empty.
dagood commentedon May 2, 2019
I believe the near-term goal is that Core-Setup is the only place referencing dotnet/standard bits, and it does so through the
Microsoft.Private.Standardtransport package. That's redisted asNETStandard.Library.Refthat should be used everywhere else. (Repos may need to use a new enough SDK to be able to useNETStandard.Library.Ref?)We're still depending on NETStandard.Library here, but it should just be a matter of changing the
PackageReference:https://github.com/dotnet/core-setup/blob/29f2b13923b066173b1a156516a3f5f8763cb276/src/pkg/projects/netstandard/src/netstandard.depproj#L10
Long-term, dotnet/standard will produce
NETStandard.Library.Refusing shared tooling. (And the workaround stubNETStandard.Library.)wtgodbe commentedon May 2, 2019
For the moment, should we transition CoreFx to
Microsoft.Private.Standard, or toNETStandard.Library.Ref? https://github.com/dotnet/corefx/blob/master/eng/Version.Details.xml#L41dagood commentedon May 2, 2019
Here's the issue for the "empty" Microsoft.NETCore.App implementation that might help with context: https://github.com/dotnet/core-setup/issues/5663.
(I don't know about the migration though.)
ericstj commentedon May 22, 2019
/cc @wtgodbe
dsplaisted commentedon May 29, 2019
@dagood Hold off on this for now, currently we are thinking of not relying on the Microsoft.NETCore.App package.
joperezr commentedon Aug 2, 2019
Customers are reporting hitting this issue with the latest sdk, and don't like the manual workaround of having to add a reference to the Targets package. This is a regression, @dsplaisted do we plan to fix this for 3.0?
dagood commentedon Aug 2, 2019
In case this is weighed against implementation difficulty (although so far it hasn't sounded like it), it's trivial to add workaround package dependencies, they just need to be added to this itemgroup:
https://github.com/dotnet/core-setup/blob/ccf0024ba099103a5b759613c48b8cd46af8754a/src/pkg/projects/netcoreapp/pkg/workaround/Microsoft.NETCore.App.pkgproj#L20-L22
7 remaining items
nguerrera commentedon Aug 3, 2019
A nestandard2.0 target should be added to Mono.Cecil and Blazor should depend on that.
cc @sbomer
nguerrera commentedon Aug 3, 2019
It looks like the code was already moved to netstandard2.0, but no release was pushed to nuget?
jbevain/cecil#599 (comment)
cc @jbevain
nguerrera commentedon Aug 4, 2019
@davidfowl Can you help push 1.x assets out of
dotnet new mvcgraph?nguerrera commentedon Aug 5, 2019
I cannot reproduce this in preview 8.
This didn't trigger it either:
Neither of these have package references.
dsplaisted commentedon Aug 6, 2019
I don't think this happens with default projects. The binlog with the failure is linked here. Based on that, the following is a minimal repro:
For the failure to occur, there need to be dependencies to both 1.0 and 1.1 band contract packages. The Blazor package is bringing in Mono.Cecil which is bringing in 1.0 contracts such as System.IO.FileSystem 4.0.1. The GPIO package is depending on several 1.1 contracts, such as System.Runtime.InteropServices.WindowsRuntime 4.3.0.
As Nick suggests, an updated Mono.Cecil package with a .NET Standard 2.0 version of the library would fix this. Updating the GPIO package so that it doesn't depend on the contract packages should also work if that's possible.
eerhardt commentedon Aug 9, 2019
@ericstj and @joperezr pointed me to this issue.
I hit this today upgrading ML.NET to 3.0. Restoring this project:
with the 3.0.100-preview8-013437 SDK results in:
If I literally change any line in the .csproj, it works:
remove either PackageReference - works
eerhardt commentedon Aug 9, 2019
Re-opening this issue so it gets noticed.
nguerrera commentedon Aug 9, 2019
I don't think this issue can track a fix. We can't use an empty package for reasons that have been discussed.
nguerrera commentedon Aug 9, 2019
Well, we can have the empty packages, but we can't auto reference them in the SDK.
nguerrera commentedon Aug 9, 2019
dotnet/sdk#3044 tracks the work on the SDK to make these scenarios just work, which after trying many workarounds and failing, is now blocked on NuGet/Home#7344
Both are still open so we should focus there rather than on this workaround issue that won't work.
Please link any reports on either of those issues.