diff options
| author | Zoltan Csizmadia <zcsizmadia@gmail.com> | 2023-11-15 10:41:31 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-15 17:41:31 +0100 |
| commit | 29e192f241136ce910071ff4fdedda5bd1d9b838 (patch) | |
| tree | 4d729880c4e4a7693d9d6255490642771ed2ef09 /src/Ryujinx.Ava | |
| parent | 5b3662b793b3a34acc12c45c3c1691b7302d4b1d (diff) | |
Migrate to .NET 8 (#5887)
* Change TargetFramework to net8.0
* Disable info messages
* Fix warings
* Disable additional analyzer messages
* Fix typo
* Add whitespace
* Fix ref vs in warnings
* Use explicit [In] on array parameters
* No need to guard Remove with Contains
* Use 'ArgumentOutOfRangeException.ThrowIf...' instead of explicitly throwing a new exception instance
* Bump .NET SDK version
* Enable JsonSerializerIsReflectionEnabledByDefault
* Use 8.0.100 GA release
* Bump System package versions
---------
Co-authored-by: Zoltan Csizmadia <Zoltan.Csizmadia@vericast.com>
Diffstat (limited to 'src/Ryujinx.Ava')
| -rw-r--r-- | src/Ryujinx.Ava/Ryujinx.Ava.csproj | 16 | ||||
| -rw-r--r-- | src/Ryujinx.Ava/UI/Helpers/Win32NativeInterop.cs | 2 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/Ryujinx.Ava/Ryujinx.Ava.csproj b/src/Ryujinx.Ava/Ryujinx.Ava.csproj index f0e99f42..6812e57c 100644 --- a/src/Ryujinx.Ava/Ryujinx.Ava.csproj +++ b/src/Ryujinx.Ava/Ryujinx.Ava.csproj @@ -1,7 +1,7 @@ <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> - <TargetFramework>net7.0</TargetFramework> - <RuntimeIdentifiers>win10-x64;osx-x64;linux-x64</RuntimeIdentifiers> + <TargetFramework>net8.0</TargetFramework> + <RuntimeIdentifiers>win-x64;osx-x64;linux-x64</RuntimeIdentifiers> <OutputType>Exe</OutputType> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <Version>1.0.0-dirty</Version> @@ -25,6 +25,16 @@ <TrimMode>partial</TrimMode> </PropertyGroup> + <!-- + FluentAvalonia, used in the Avalonia UI, requires a workaround for the json serializer used internally when using .NET 8+ System.Text.Json. + See: + https://github.com/amwx/FluentAvalonia/issues/481 + https://devblogs.microsoft.com/dotnet/system-text-json-in-dotnet-8/ + --> + <PropertyGroup> + <JsonSerializerIsReflectionEnabledByDefault>true</JsonSerializerIsReflectionEnabledByDefault> + </PropertyGroup> + <ItemGroup> <PackageReference Include="Avalonia" /> <PackageReference Include="Avalonia.Desktop" /> @@ -40,7 +50,7 @@ <PackageReference Include="OpenTK.Core" /> <PackageReference Include="Ryujinx.Audio.OpenAL.Dependencies" Condition="'$(RuntimeIdentifier)' != 'linux-x64' AND '$(RuntimeIdentifier)' != 'osx-x64' AND '$(RuntimeIdentifier)' != 'osx-arm64'" /> <PackageReference Include="Ryujinx.Graphics.Nvdec.Dependencies" /> - <PackageReference Include="Ryujinx.Graphics.Vulkan.Dependencies.MoltenVK" Condition="'$(RuntimeIdentifier)' != 'linux-x64' AND '$(RuntimeIdentifier)' != 'win10-x64'" /> + <PackageReference Include="Ryujinx.Graphics.Vulkan.Dependencies.MoltenVK" Condition="'$(RuntimeIdentifier)' != 'linux-x64' AND '$(RuntimeIdentifier)' != 'win-x64'" /> <PackageReference Include="Silk.NET.Vulkan" /> <PackageReference Include="Silk.NET.Vulkan.Extensions.EXT" /> <PackageReference Include="Silk.NET.Vulkan.Extensions.KHR" /> diff --git a/src/Ryujinx.Ava/UI/Helpers/Win32NativeInterop.cs b/src/Ryujinx.Ava/UI/Helpers/Win32NativeInterop.cs index ca55d039..35d16b9e 100644 --- a/src/Ryujinx.Ava/UI/Helpers/Win32NativeInterop.cs +++ b/src/Ryujinx.Ava/UI/Helpers/Win32NativeInterop.cs @@ -86,7 +86,7 @@ namespace Ryujinx.Ava.UI.Helpers public static partial IntPtr SetCursor(IntPtr handle); [LibraryImport("user32.dll")] - public static partial IntPtr CreateCursor(IntPtr hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, byte[] pvAndPlane, byte[] pvXorPlane); + public static partial IntPtr CreateCursor(IntPtr hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, [In] byte[] pvAndPlane, [In] byte[] pvXorPlane); [LibraryImport("user32.dll", SetLastError = true, EntryPoint = "RegisterClassExW")] public static partial ushort RegisterClassEx(ref WndClassEx param); |
