reactiveui / splat

Makes things cross-platform
MIT License
972 stars 142 forks source link

Nuget error adding framework reference to 'System.Runtime' for Android 8.1 with Xamarin Forms #187

Closed jmjohnson05 closed 6 years ago

jmjohnson05 commented 6 years ago

I have a Xamarin.Forms (version 3.0) application that targets Android 8.1 (Oreo), and I am receiving an error when I try to update Splat to version 4.0.0. I am using Visual Studio 2017 and the message in the error console is as follows.

Failed to add reference. The package 'Splat' tried to add a framework reference to 'System.Runtime' which was not found in the GAC. This is possibly a bug in the package. Please contact the package owners for assistance.

image

Has anyone else seen this issue? Is there a way to work around it without removing the Nuget package reference altogether? Any help is appreciated.

simontom commented 6 years ago

Hi, I have to sadly tell you this: I have Xamarin.Droid project and tried to add the new Splat 4.0.0 as a nupkg. I'm getting the same Error as you and looking for some workaround as well.

meikeric commented 6 years ago

Same issue here as well...

clairernovotny commented 6 years ago

@ghuntley This is fixed by using the latest version of the Extras and repacking. Bad frameworkAssembly refs were incorrectly getting added.

betsygeorge commented 6 years ago

@onovotny can you clarify what you mean by "the Extras"

meikeric commented 6 years ago

@onovotny Do you mean MSBuild.Sdk.Extras?

clairernovotny commented 6 years ago

Yes, but to build Splat, it won't help consumers of it.

meikeric commented 6 years ago

This is holding up my ability to rebuild a library I'm using that references ReactiveUI. Would a pull request from me do any good to get a new release of splat and reactiveui that can be installed via Nuget?

simontom commented 6 years ago

Ahoy, can you, please, try removing ol' ReactiveUI and Splat, then add System.Runtime manually via Add Reference -> Browse (I think, you will be able to find it out somewhere over here: "C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a"). After you add new ReactiveUI and Splat + System.Reactive.* NuGets, you can remove the reference again. It should work without any problem. This is the scenario how I solved my issue. OKay, to be honest, I had to move from PCL project type to NET Standard, but it is another story. ((o: Hope it helps!