From 737f6b149fe2749259f0bd07d332fa92d31b933b Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Fri, 11 Apr 2025 19:27:17 +1000 Subject: [PATCH 1/5] Bump .NET SDK to 10 --- contributing.md | 8 ++++---- default.nix | 1 + global.json | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/contributing.md b/contributing.md index 218a1bc1a0f..9db3d911ddf 100644 --- a/contributing.md +++ b/contributing.md @@ -68,18 +68,18 @@ It's probably a good idea to get the .NET SDK, even if you're not working on a . ## For any: .NET project - Linux - - Install the .NET 8 SDK (package name is usually `dotnet-sdk-8.0`, see [full instructions](https://learn.microsoft.com/dotnet/core/install/linux)). + - Install the .NET 10 SDK (package name is usually `dotnet-sdk-10.0`, see [full instructions](https://learn.microsoft.com/dotnet/core/install/linux)). - VS Community isn't available for Linux, but Rider and VS Code are. - Nix/NixOS users can get the .NET SDK ephemerally with the provided `shell.nix`. For IDE setup and more, see the [Nix-specific docs](Dist/nix_expr_usage_docs.md#ide-setup). - macOS - Note that EmuHawk does not currently support macOS. - - Install the .NET 8 SDK [manually](https://learn.microsoft.com/dotnet/core/install/macos) or with Homebrew. + - Install the .NET 10 SDK [manually](https://learn.microsoft.com/dotnet/core/install/macos) or with Homebrew. - VS Community isn't available for macOS, but Rider and VS Code are. - Windows - - The .NET 8 SDK comes with [VS Community 2022](https://visualstudio.microsoft.com/vs/community) (see [full instructions](https://learn.microsoft.com/dotnet/core/install/windows)). + - The .NET 10 SDK comes with [VS Community 2022](https://visualstudio.microsoft.com/vs/community) (see [full instructions](https://learn.microsoft.com/dotnet/core/install/windows)). - You can also use Rider, VS Code, or something else instead of VS Community. -For EmuHawk and libraries in the main solution, which do not target .NET 8, we have [this page](https://github.com/TASEmulators/BizHawk/wiki/Available-C%23-and-.NET-features) documenting which features are actually available to use. +For EmuHawk and libraries in the main solution, which do not target .NET 10, we have [this page](https://github.com/TASEmulators/BizHawk/wiki/Available-C%23-and-.NET-features) documenting which features are actually available to use. We also have [supplemental docs](https://github.com/TASEmulators/BizHawk/wiki/C%23-and-.NET-docs-supplement) on some of the language's footguns. diff --git a/default.nix b/default.nix index 77ec34e8272..b206830812c 100644 --- a/default.nix +++ b/default.nix @@ -27,6 +27,7 @@ in { src = builtins.path { path = ./.; name = "BizHawk-${version}"; }; # source derivation; did have filter here for speed, but it wasn't faster and it wasn't correct and it couldn't be made correct and I'm mad } # makedeps +#, dotnet-sdk_10 ? pkgs.dotnet-sdk_10 #TODO , dotnet-sdk_8 ? pkgs.dotnet-sdk_8 , dotnet-sdk_6 ? pkgs.dotnet-sdk_6 , dotnet-sdk_5 ? let result = builtins.tryEval pkgs.dotnet-sdk_5; in if result.success diff --git a/global.json b/global.json index 8746d74b567..5fd1447a98f 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,7 @@ { "sdk": { - "version": "8.0.0", + "version": "10.0.0", "allowPrerelease": true, - "rollForward": "latestMajor" + "rollForward": "latestMinor" } } From 98c6d076abcd5d6478235e7df3cf2efeedb2fad4 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Fri, 11 Apr 2025 19:41:30 +1000 Subject: [PATCH 2/5] Remove `.sln.DotSettings` I think this is or was for ReSharper? Needs testing, and if it turns out this did something useful, hopefully it can be re-added as EditorConfig --- BizHawk.sln.DotSettings | 620 ---------------------------------------- 1 file changed, 620 deletions(-) delete mode 100644 BizHawk.sln.DotSettings diff --git a/BizHawk.sln.DotSettings b/BizHawk.sln.DotSettings deleted file mode 100644 index 6fba05cef2b..00000000000 --- a/BizHawk.sln.DotSettings +++ /dev/null @@ -1,620 +0,0 @@ - - False - True - ExplicitlyExcluded - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - DO_NOT_SHOW - HINT - DO_NOT_SHOW - 0 - None - False - False - False - USE_TABS_ONLY - Tab - NEXT_LINE - True - False - True - True - CHOP_ALWAYS - CHOP_ALWAYS - CHOP_ALWAYS - False - False - AF - AL - API - AR - ARGB - AV - BG - BMP - CDL - CGB - CRC - DB - DC - DMG - DS - DX - GB - GBA - GBC - GBL - GG - GL - GPGX - ID - II - IO - IPS - IRQ - LR - MGBA - NDS - NES - NMI - NT - NTSC - OBJ - OR - OSD - PAL - PC - PCE - PCECD - PPU - PSP - PSX - RAM - RL - RTC - SG - SGB - SGX - SHA - SNES - SQ - TA - TAS - TI - TIA - UI - VBA - ROM - ZX - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb_AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB"><ExtraRule Prefix="" Suffix="" Style="AaBb" /></Policy> - <Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /> - <Policy><Descriptor Staticness="Any" AccessRightKinds="Private" Description="Constant fields (private)"><ElementKinds><Kind Name="CONSTANT_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB"><ExtraRule Prefix="" Suffix="" Style="AaBb" /></Policy></Policy> - <Policy><Descriptor Staticness="Instance" AccessRightKinds="Private" Description="Instance fields (private)"><ElementKinds><Kind Name="FIELD" /><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /></Policy> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="I" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="T" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> - C:\Users\Andy Delikat\AppData\Local\JetBrains\Transient\ReSharperPlatformVs15\v11_5c6a09eb\SolutionCaches - LIVE_MONITOR - LIVE_MONITOR - DO_NOTHING - LIVE_MONITOR - LIVE_MONITOR - LIVE_MONITOR - LIVE_MONITOR - LIVE_MONITOR - LIVE_MONITOR - LIVE_MONITOR - DO_NOTHING - DO_NOTHING - LIVE_MONITOR - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - - - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - True - \ No newline at end of file From e295ccae3da8d0d44ad201e1c5dcaad179fc3897 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Fri, 11 Apr 2025 19:44:58 +1000 Subject: [PATCH 3/5] Migrate solution file to new format (resolves #4097) --- BizHawk.sln | 122 --------------------------------------------------- BizHawk.slnx | 22 ++++++++++ 2 files changed, 22 insertions(+), 122 deletions(-) delete mode 100644 BizHawk.sln create mode 100644 BizHawk.slnx diff --git a/BizHawk.sln b/BizHawk.sln deleted file mode 100644 index 2067752ffe5..00000000000 --- a/BizHawk.sln +++ /dev/null @@ -1,122 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.33627.172 -MinimumVisualStudioVersion = 16.0.28729.10 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Client.Common", "src\BizHawk.Client.Common\BizHawk.Client.Common.csproj", "{24A0AA3C-B25F-4197-B23D-476D6462DBA0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Common", "src\BizHawk.Common\BizHawk.Common.csproj", "{866F8D13-0678-4FF9-80A4-A3993FD4D8A3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Client.EmuHawk", "src\BizHawk.Client.EmuHawk\BizHawk.Client.EmuHawk.csproj", "{DD448B37-BA3F-4544-9754-5406E8094723}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Client.DiscoHawk", "src\BizHawk.Client.DiscoHawk\BizHawk.Client.DiscoHawk.csproj", "{C4366030-6D03-424B-AE53-F4F43BB217C3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Emulation.DiscSystem", "src\BizHawk.Emulation.DiscSystem\BizHawk.Emulation.DiscSystem.csproj", "{F51946EA-827F-4D82-B841-1F2F6D060312}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Emulation.Common", "src\BizHawk.Emulation.Common\BizHawk.Emulation.Common.csproj", "{E1A23168-B571-411C-B360-2229E7225E0E}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{B51F1139-3D2C-41BE-A762-EF1F9B41EACA}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Emulation", "Emulation", "{3627C08B-3E43-4224-9DA4-40BD69495FBC}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Emulation.Cores", "src\BizHawk.Emulation.Cores\BizHawk.Emulation.Cores.csproj", "{197D4314-8A9F-49BA-977D-54ACEFAEB6BA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Bizware.Audio", "src\BizHawk.Bizware.Audio\BizHawk.Bizware.Audio.csproj", "{9F84A0B2-861E-4EF4-B89B-5E2A3F38A465}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Bizware.Input", "src\BizHawk.Bizware.Input\BizHawk.Bizware.Input.csproj", "{17E7D20D-198C-4728-ACEC-065DE834FF02}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Bizware.Graphics", "src\BizHawk.Bizware.Graphics\BizHawk.Bizware.Graphics.csproj", "{368BC91D-48CD-492A-B6CF-B5B77F7FE7D4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Bizware.Graphics.Controls", "src\BizHawk.Bizware.Graphics.Controls\BizHawk.Bizware.Graphics.Controls.csproj", "{3D050D35-B57D-4D14-BE0F-FD63552DADB0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.BizInvoke", "src\BizHawk.BizInvoke\BizHawk.BizInvoke.csproj", "{E5D76DC1-84A8-47AF-BE25-E76F06D2FBBC}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.WinForms.Controls", "src\BizHawk.WinForms.Controls\BizHawk.WinForms.Controls.csproj", "{B5A2214B-3CB0-48C4-8DB1-98B38D48AC4A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{74391239-9BC1-40CE-A3D7-180737C5302A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Tests", "src\BizHawk.Tests\BizHawk.Tests.csproj", "{284E19E2-661D-4A7D-864A-AC2FC91E7C25}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {24A0AA3C-B25F-4197-B23D-476D6462DBA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24A0AA3C-B25F-4197-B23D-476D6462DBA0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24A0AA3C-B25F-4197-B23D-476D6462DBA0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24A0AA3C-B25F-4197-B23D-476D6462DBA0}.Release|Any CPU.Build.0 = Release|Any CPU - {866F8D13-0678-4FF9-80A4-A3993FD4D8A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {866F8D13-0678-4FF9-80A4-A3993FD4D8A3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {866F8D13-0678-4FF9-80A4-A3993FD4D8A3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {866F8D13-0678-4FF9-80A4-A3993FD4D8A3}.Release|Any CPU.Build.0 = Release|Any CPU - {DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DD448B37-BA3F-4544-9754-5406E8094723}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DD448B37-BA3F-4544-9754-5406E8094723}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DD448B37-BA3F-4544-9754-5406E8094723}.Release|Any CPU.Build.0 = Release|Any CPU - {C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C4366030-6D03-424B-AE53-F4F43BB217C3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Any CPU.Build.0 = Release|Any CPU - {F51946EA-827F-4D82-B841-1F2F6D060312}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F51946EA-827F-4D82-B841-1F2F6D060312}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F51946EA-827F-4D82-B841-1F2F6D060312}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F51946EA-827F-4D82-B841-1F2F6D060312}.Release|Any CPU.Build.0 = Release|Any CPU - {E1A23168-B571-411C-B360-2229E7225E0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E1A23168-B571-411C-B360-2229E7225E0E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E1A23168-B571-411C-B360-2229E7225E0E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E1A23168-B571-411C-B360-2229E7225E0E}.Release|Any CPU.Build.0 = Release|Any CPU - {197D4314-8A9F-49BA-977D-54ACEFAEB6BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {197D4314-8A9F-49BA-977D-54ACEFAEB6BA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {197D4314-8A9F-49BA-977D-54ACEFAEB6BA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {197D4314-8A9F-49BA-977D-54ACEFAEB6BA}.Release|Any CPU.Build.0 = Release|Any CPU - {9F84A0B2-861E-4EF4-B89B-5E2A3F38A465}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9F84A0B2-861E-4EF4-B89B-5E2A3F38A465}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9F84A0B2-861E-4EF4-B89B-5E2A3F38A465}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9F84A0B2-861E-4EF4-B89B-5E2A3F38A465}.Release|Any CPU.Build.0 = Release|Any CPU - {17E7D20D-198C-4728-ACEC-065DE834FF02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {17E7D20D-198C-4728-ACEC-065DE834FF02}.Debug|Any CPU.Build.0 = Debug|Any CPU - {17E7D20D-198C-4728-ACEC-065DE834FF02}.Release|Any CPU.ActiveCfg = Release|Any CPU - {17E7D20D-198C-4728-ACEC-065DE834FF02}.Release|Any CPU.Build.0 = Release|Any CPU - {368BC91D-48CD-492A-B6CF-B5B77F7FE7D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {368BC91D-48CD-492A-B6CF-B5B77F7FE7D4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {368BC91D-48CD-492A-B6CF-B5B77F7FE7D4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {368BC91D-48CD-492A-B6CF-B5B77F7FE7D4}.Release|Any CPU.Build.0 = Release|Any CPU - {3D050D35-B57D-4D14-BE0F-FD63552DADB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3D050D35-B57D-4D14-BE0F-FD63552DADB0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3D050D35-B57D-4D14-BE0F-FD63552DADB0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3D050D35-B57D-4D14-BE0F-FD63552DADB0}.Release|Any CPU.Build.0 = Release|Any CPU - {E5D76DC1-84A8-47AF-BE25-E76F06D2FBBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E5D76DC1-84A8-47AF-BE25-E76F06D2FBBC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E5D76DC1-84A8-47AF-BE25-E76F06D2FBBC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E5D76DC1-84A8-47AF-BE25-E76F06D2FBBC}.Release|Any CPU.Build.0 = Release|Any CPU - {B5A2214B-3CB0-48C4-8DB1-98B38D48AC4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B5A2214B-3CB0-48C4-8DB1-98B38D48AC4A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B5A2214B-3CB0-48C4-8DB1-98B38D48AC4A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B5A2214B-3CB0-48C4-8DB1-98B38D48AC4A}.Release|Any CPU.Build.0 = Release|Any CPU - {284E19E2-661D-4A7D-864A-AC2FC91E7C25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {284E19E2-661D-4A7D-864A-AC2FC91E7C25}.Debug|Any CPU.Build.0 = Debug|Any CPU - {284E19E2-661D-4A7D-864A-AC2FC91E7C25}.Release|Any CPU.ActiveCfg = Release|Any CPU - {284E19E2-661D-4A7D-864A-AC2FC91E7C25}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {24A0AA3C-B25F-4197-B23D-476D6462DBA0} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA} - {DD448B37-BA3F-4544-9754-5406E8094723} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA} - {C4366030-6D03-424B-AE53-F4F43BB217C3} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA} - {F51946EA-827F-4D82-B841-1F2F6D060312} = {3627C08B-3E43-4224-9DA4-40BD69495FBC} - {E1A23168-B571-411C-B360-2229E7225E0E} = {3627C08B-3E43-4224-9DA4-40BD69495FBC} - {197D4314-8A9F-49BA-977D-54ACEFAEB6BA} = {3627C08B-3E43-4224-9DA4-40BD69495FBC} - {B5A2214B-3CB0-48C4-8DB1-98B38D48AC4A} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA} - {284E19E2-661D-4A7D-864A-AC2FC91E7C25} = {74391239-9BC1-40CE-A3D7-180737C5302A} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {9B9E4316-9185-412E-B951-A63355ACA956} - EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution - StartupItem = BizHawk.Client.EmuHawk\BizHawk.Client.EmuHawk.csproj - EndGlobalSection -EndGlobal diff --git a/BizHawk.slnx b/BizHawk.slnx new file mode 100644 index 00000000000..e6570ecfc4a --- /dev/null +++ b/BizHawk.slnx @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + From d626799206bb213611983a6d55d3bbea65dc2c3c Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Sat, 7 Jun 2025 12:38:23 +1000 Subject: [PATCH 4/5] Bump `` to 14 --- .editorconfig | 1 + Common.props | 2 +- .../Consoles/PC Engine/QuickCollections.cs | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.editorconfig b/.editorconfig index e7fa14bdf8c..8299bbd46be 100644 --- a/.editorconfig +++ b/.editorconfig @@ -15,6 +15,7 @@ csharp_space_after_cast = true csharp_indent_switch_labels = true csharp_indent_case_contents = true csharp_indent_labels = one_less_than_current +dotnet_style_require_accessibility_modifiers = for_non_interface_members trim_trailing_whitespace = true # Style rules diff --git a/Common.props b/Common.props index 1ea6589d6cd..bc5781819bb 100644 --- a/Common.props +++ b/Common.props @@ -18,7 +18,7 @@ strict $(TargetFramework.StartsWith("net4")) true - 12.0 + 14.0 true $(NoWarn);CS1591;SA0001 enable diff --git a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/QuickCollections.cs b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/QuickCollections.cs index 7d7ccb58748..53253b559f1 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/PC Engine/QuickCollections.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/PC Engine/QuickCollections.cs @@ -53,7 +53,7 @@ public QuickQueue(int capacity) public void Enqueue(T item) { if (size >= buffer.Length) - throw new Exception($"{nameof(QuickQueue)} capacity breached!"); + throw new Exception($"{nameof(QuickQueue<>)} capacity breached!"); buffer[tail] = item; tail = (tail + 1) % buffer.Length; @@ -78,7 +78,7 @@ public T[] ToArray(int elemSize) public T Dequeue() { if (size == 0) - throw new Exception($"{nameof(QuickQueue)} is empty!"); + throw new Exception($"{nameof(QuickQueue<>)} is empty!"); T item = buffer[head]; head = (head + 1) % buffer.Length; From 1ebc4f5ce5f3d35b1202bc50b2901e8e82cc2e4e Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Thu, 3 Jul 2025 11:19:01 +1000 Subject: [PATCH 5/5] WIP Add Analyzer to prevent empty `ArraySegment` collection expression --- .../BrokenCollectionExpressionAnalyzer.cs | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 ExternalProjects/BizHawk.Analyzer/BrokenCollectionExpressionAnalyzer.cs diff --git a/ExternalProjects/BizHawk.Analyzer/BrokenCollectionExpressionAnalyzer.cs b/ExternalProjects/BizHawk.Analyzer/BrokenCollectionExpressionAnalyzer.cs new file mode 100644 index 00000000000..396001eedc5 --- /dev/null +++ b/ExternalProjects/BizHawk.Analyzer/BrokenCollectionExpressionAnalyzer.cs @@ -0,0 +1,35 @@ +namespace BizHawk.Analyzers; + +using System.Collections.Immutable; + +[DiagnosticAnalyzer(LanguageNames.CSharp)] +public sealed class BrokenCollectionExpressionAnalyzer : DiagnosticAnalyzer +{ + private static readonly DiagnosticDescriptor DiagBrokenCollectionExpression = new( + id: "BHI1234", + title: "don't this", + messageFormat: "don't this", + category: "Usage", + defaultSeverity: DiagnosticSeverity.Warning, + isEnabledByDefault: true); + + public override ImmutableArray SupportedDiagnostics { get; } + = ImmutableArray.Create(/*HawkSourceAnalyzer.DiagWTF,*/ DiagBrokenCollectionExpression); + + public override void Initialize(AnalysisContext context) + { + context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None); + context.EnableConcurrentExecution(); + context.RegisterCompilationStartAction(initContext => + { + var arraySegmentSym = initContext.Compilation.GetTypeByMetadataName("System.ArraySegment`1")!; + initContext.RegisterOperationAction( + oac => + { + var operation = (ICollectionExpressionOperation) oac.Operation; + if (arraySegmentSym.Matches(operation.Type)) DiagBrokenCollectionExpression.ReportAt(operation, oac); + }, + OperationKind.CollectionExpression); + }); + } +}