Open 7sharp9 opened 7 years ago
I have omitted an Android project but it would have paket references to almost all the nugets in the default group.
@matthid and myself are not 100% sure what happens. But if you restrict it to netstandard2 then it restores and builds fine. see https://github.com/7sharp9/paket-mobile-test/pull/1
I think it is an issue with netstandard 1.6 vs. 2 - apparently android 7 is compatible to netstandard1.6 but for some reason not to 2.0
So ... If I add an android project then I would have to add a separate group for it without the net standard restriction?
that might work. we don't really understand yet why the monoandroid is incompatible to netstandard2. maybe nuget bug!?
ok I think it's a paket bug. The following happens:
in every situation where Xamarin.Android.Support.v7.AppCompat
is used we see >= monoandroid7.0 as restriciton. that's good.
but when we lock the package down we lose that information for some reason.
no idea where it get's lost
ok now I know: it's because it's directly in deps file.
merge this one: https://github.com/7sharp9/paket-mobile-test/pull/2/files#diff-b27553841b4413a24ed1b9aff865105bL13
nuget Xamarin.Android.Support.v4
nuget Xamarin.Android.Support.v7.AppCompat
Both of those are android requirements but not for the core projects.
I agree that this is a problem or at least quite unexpected. The problem is that we don't properly calculate restrictions in that case:
Somehow this at least feels somehow wrong:
references file take a subtree, but in the above situation the subtree needs/can to be trimmed further (by evaluating restrictions again?)
Description
Creating a .Net standard2.0 project that also has Android references to Xamarin.Android.Support.v7.AppCompat
seems to create an unnecessary transient dependency to
Xamarin.Android.Support.v7.AppCompat`.The .Net standard project references
Microsoft.Identity.Client
which only has a reference toXamarin.Android.Support.v7.AppCompat
in the MonoAndroid version of the assembly yetdotnet restore
seems to try and restore that package.Repro steps
I created a repo here: https://github.com/7sharp9/paket-mobile-test
Expected behavior
dotnet restore Core
works successfullyActual behavior
dotnet restore Core
fails withKnown workarounds
?