diff --git a/PInvoke/Gdi32/GdiObjExtensions.cs b/PInvoke/Gdi32/GdiObjExtensions.cs index 8af9d0b8..84782004 100644 --- a/PInvoke/Gdi32/GdiObjExtensions.cs +++ b/PInvoke/Gdi32/GdiObjExtensions.cs @@ -114,7 +114,7 @@ namespace Vanara.PInvoke //} -#if !NET20 && !NETSTANDARD2_0 && !NETCOREAPP2_0 && !NETCOREAPP2_1 +#if WPF && !NET20 && !NETSTANDARD2_0 && !NETCOREAPP2_0 && !NETCOREAPP2_1 /// Creates a from an preserving transparency, if possible. /// The HBITMAP value. /// The BitmapSource instance. If is a NULL handle, is returned. diff --git a/PInvoke/Gdi32/Vanara.PInvoke.Gdi32.csproj b/PInvoke/Gdi32/Vanara.PInvoke.Gdi32.csproj index a685ba93..49797100 100644 --- a/PInvoke/Gdi32/Vanara.PInvoke.Gdi32.csproj +++ b/PInvoke/Gdi32/Vanara.PInvoke.Gdi32.csproj @@ -6,9 +6,9 @@ PInvoke API (methods, structures and constants) imported from Windows Gdi32.dll $(AssemblyName) - true + net20;net35;net40;net45;net5.0;net6.0;netstandard2.0;netcoreapp2.0;netcoreapp2.1;netcoreapp3.0;netcoreapp3.1 Vanara.PInvoke.Gdi32 $(AssemblyName) diff --git a/PInvoke/User32/Vanara.PInvoke.User32.csproj b/PInvoke/User32/Vanara.PInvoke.User32.csproj index d2f71cf4..77c4afd3 100644 --- a/PInvoke/User32/Vanara.PInvoke.User32.csproj +++ b/PInvoke/User32/Vanara.PInvoke.User32.csproj @@ -7,9 +7,9 @@ PInvoke API (methods, structures and constants) imported from Windows User32.dll. $(AssemblyName) net20;net35;net40;net45;net5.0;net6.0;netstandard2.0;netcoreapp2.0;netcoreapp2.1;netcoreapp3.0;netcoreapp3.1 - true + Vanara.PInvoke.User32 $(AssemblyName) pinvoke;vanara;net-extensions;interop diff --git a/PInvoke/User32/WinUser.Icon.cs b/PInvoke/User32/WinUser.Icon.cs index 59f153b6..6c44bd53 100644 --- a/PInvoke/User32/WinUser.Icon.cs +++ b/PInvoke/User32/WinUser.Icon.cs @@ -1242,7 +1242,7 @@ namespace Vanara.PInvoke /// A managed bitmap instance. public static Bitmap ToBitmap(this HICON hIcon) => hIcon.IsNull ? null : (Bitmap)Bitmap.FromHicon((IntPtr)hIcon).Clone(); -#if !NET20 && !NETSTANDARD2_0 && !NETCOREAPP2_0 && !NETCOREAPP2_1 +#if WPF && !NET20 && !NETSTANDARD2_0 && !NETCOREAPP2_0 && !NETCOREAPP2_1 /// Creates a from an . /// The HICON value. /// The BitmapSource instance. If is a NULL handle, is returned. @@ -1381,7 +1381,7 @@ namespace Vanara.PInvoke /// A managed bitmap instance. public Bitmap ToBitmap() => ((HICON)this).ToBitmap(); -#if !NET20 && !NETSTANDARD2_0 && !NETCOREAPP2_0 && !NETCOREAPP2_1 +#if WPF && !NET20 && !NETSTANDARD2_0 && !NETCOREAPP2_0 && !NETCOREAPP2_1 /// Creates a from an . /// The BitmapSource instance. If this is a NULL handle, is returned. public System.Windows.Media.Imaging.BitmapSource ToBitmapSource() => ((HICON)this).ToBitmapSource();