diff --git a/src/Splat.Drawing/Platforms/ServiceLocationDrawingInitialization.cs b/src/Splat.Drawing/Platforms/ServiceLocationDrawingInitialization.cs index 0723fb5f4..db17b2780 100644 --- a/src/Splat.Drawing/Platforms/ServiceLocationDrawingInitialization.cs +++ b/src/Splat.Drawing/Platforms/ServiceLocationDrawingInitialization.cs @@ -23,8 +23,8 @@ public static void RegisterPlatformBitmapLoader(this IMutableDependencyResolver throw new ArgumentNullException(nameof(resolver)); } -#if !NETSTANDARD - // not supported in netstandard2.0 +#if !NETSTANDARD && !NET5_0 && !NET6_0 + // not supported in netstandard2.0 or NET5/6 library if (!resolver.HasRegistration(typeof(IBitmapLoader))) { resolver.RegisterLazySingleton(() => new PlatformBitmapLoader(), typeof(IBitmapLoader)); diff --git a/src/Splat.Drawing/Splat.Drawing.csproj b/src/Splat.Drawing/Splat.Drawing.csproj index dc0340725..d27065b7b 100644 --- a/src/Splat.Drawing/Splat.Drawing.csproj +++ b/src/Splat.Drawing/Splat.Drawing.csproj @@ -1,7 +1,7 @@ - MonoAndroid90;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;Xamarin.WatchOS10;tizen40;netstandard2.0;net6.0-android;net6.0-ios;net6.0-tvos;net6.0-macos + MonoAndroid90;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;Xamarin.WatchOS10;tizen40;netstandard2.0;net5.0;net6.0;net6.0-android;net6.0-ios;net6.0-tvos;net6.0-macos $(TargetFrameworks);net461;net472;uap10.0.16299;netcoreapp3.1;net5.0-windows;net6.0-windows Splat .NET Foundation and Contributors