reactiveui/splat

[BUG] Core 3.1 and standard 2.0 Nuget packages don't include platform specific implementation of IBitmap.

mcpherson-sa opened this issue · 4 comments

Please note although we can't commit to any timeline, priority will be given to those who are Contributors to the project.

If this is a question please ask on StackOverflow.

Describe the bug
BitmapLoader.Current.Load throws a BitmapLoaderException. Verified by decompiling that the Splat.Drawing.dll does not contain any implementation of IBitmap in the netcoreapp3.1 or netstandard2.0. The .Net 4.6.1 version for example, does have one (BitmapSource).

The code is in the git repo so assume this is Nuget packaging issue. Would be happy to have a go at submitting a pull request but I cant see the packaging config in this repo (I haven't built Nuget packages before so am not entirely sure) - can I find it elsewhere?

Steps To Reproduce
Create a dotnet core project targeting netcoreapp3.1 and add reference to Splat.Drawing 9.5.49 using dotnet add package.
Add a call to BitmapLoader.Current.Load and observe that BitmapLoaderException is thrown.

Expected behavior
BitmapLoader.Current.Load should return an instance of IBitmap.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment(please complete the following information):

  • OS: [e.g. iOS]
    Windows 10

Additional context
Add any other context about the problem here.

It should exist.

<Compile Include="Platforms\netcoreapp3\**\*.cs" />

And

So might be helpful if you provide a sample repo

So the class is there, it just doesn't show up in the object browser, presumable because it is internal.
What I was missing was a call to Locator.CurrentMutable.RegisterPlatformBitmapLoader();
I came across this because I was building ReactiveGit and it broke wen I upgraded the reference to Splat.Drawing to the laatest version.

Is this documented anywhere? I looked in the README for the Splat repo and couldn't find it. Is there more documentation elsewhere?

If not I can submit a PR with a update to the README.

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.