From 6daaca934ca2284a73ab743bf89c848c57cd9de1 Mon Sep 17 00:00:00 2001 From: Kurt Date: Fri, 27 Feb 2026 13:39:16 -0600 Subject: [PATCH] Update to .NET 10 --- .editorconfig | 99 ++++++++++++++++++++++++++++ README.md | 6 ++ pk3DS.Core/CTR/AES.cs | 7 +- pk3DS.Core/pk3DS.Core.csproj | 2 +- pk3DS.WinForms/pk3DS.WinForms.csproj | 2 +- pk3DS.sln | 27 -------- pk3DS.slnx | 7 ++ 7 files changed, 118 insertions(+), 32 deletions(-) create mode 100644 .editorconfig delete mode 100644 pk3DS.sln create mode 100644 pk3DS.slnx diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..e8422f2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,99 @@ +root = true + +# All Files +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +tab_width = 4 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.txt] +insert_final_newline = false + +# XML Project Files +[*.{slnx,csproj}] +indent_size = 2 +tab_width = 2 + +# Code Files +[*.{cs,vb}] +end_of_line = crlf + +dotnet_diagnostic.IDE0047.severity = none +dotnet_diagnostic.IDE0048.severity = none +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggest +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggest +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggest +dotnet_style_parentheses_in_other_operators = always_for_clarity:suggest + +csharp_indent_labels = one_less_than_current +csharp_prefer_braces = when_multiline:warning +csharp_prefer_simple_using_statement = true:suggestion +csharp_prefer_system_threading_lock = true:suggestion +csharp_style_namespace_declarations = block_scoped:silent +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_top_level_statements = true:silent +csharp_style_prefer_primary_constructors = true:suggestion +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_local_functions = false:silent +csharp_using_directive_placement = outside_namespace:silent + +dotnet_style_operator_placement_when_wrapping = beginning_of_line +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +dotnet_style_explicit_tuple_names = true:suggestion + +#### Naming styles #### + +# Naming rules + +dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion +dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface +dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i + +dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.types_should_be_pascal_case.symbols = types +dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case + +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members +dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case + +# Symbol specifications + +dotnet_naming_symbols.interface.applicable_kinds = interface +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected + +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected + +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected + +# Naming styles + +dotnet_naming_style.begins_with_i.required_prefix = I +dotnet_naming_style.begins_with_i.capitalization = pascal_case + +dotnet_naming_style.pascal_case.capitalization = pascal_case + +# IDE0130: Namespace does not match folder structure +dotnet_diagnostic.IDE0130.severity = none + +# WFO1000: Property does not configure the code serialization for its property content. +dotnet_diagnostic.WFO1000.severity = none \ No newline at end of file diff --git a/README.md b/README.md index c04256e..64c23f3 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,12 @@ Below are some images of how the editor should look when you run it. ![ExeFS Editing Tools](https://i.imgur.com/Ied0sVV.png) ![CRO Editing Tools](https://i.imgur.com/lUSGbw5.png) +## Building + +pk3DS is a Windows Forms application which requires [.NET 10](https://dotnet.microsoft.com/download/dotnet/10.0). + +The executable can be built with any compiler that supports C# 14. + ## Support If any bugs or errors are caught or experienced come to our [forum page](https://projectpokemon.org/home/forums/topic/34377-pk3ds-pok%C3%A9mon-3ds-rom-editor-and-randomizer/) and communicate with us on what the issue is. diff --git a/pk3DS.Core/CTR/AES.cs b/pk3DS.Core/CTR/AES.cs index 8e9bc27..ea77fa6 100644 --- a/pk3DS.Core/CTR/AES.cs +++ b/pk3DS.Core/CTR/AES.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Linq; using System.Security.Cryptography; @@ -52,13 +53,13 @@ public class AesCounter public AesCounter(ulong high, ulong low) { - Array.Copy(BitConverter.GetBytes(high).Reverse().ToArray(), Counter, 0x8); - Array.Copy(BitConverter.GetBytes(low).Reverse().ToArray(), 0, Counter, 0x8, 0x8); + Array.Copy(((IEnumerable)BitConverter.GetBytes(high)).Reverse().ToArray(), Counter, 0x8); + Array.Copy(((IEnumerable)BitConverter.GetBytes(low)).Reverse().ToArray(), 0, Counter, 0x8, 0x8); } public AesCounter(byte[] iv) { - Array.Copy(BitConverter.GetBytes(BitConverter.ToUInt64(iv, 0)).Reverse().ToArray(), Counter, 0x10); + Array.Copy(((IEnumerable)BitConverter.GetBytes(BitConverter.ToUInt64(iv, 0))).Reverse().ToArray(), Counter, 0x10); } public void Increment() diff --git a/pk3DS.Core/pk3DS.Core.csproj b/pk3DS.Core/pk3DS.Core.csproj index a50fd89..4be6e75 100644 --- a/pk3DS.Core/pk3DS.Core.csproj +++ b/pk3DS.Core/pk3DS.Core.csproj @@ -1,7 +1,7 @@  true - net8.0-windows + net10.0-windows true diff --git a/pk3DS.WinForms/pk3DS.WinForms.csproj b/pk3DS.WinForms/pk3DS.WinForms.csproj index c8f11d8..a44453e 100644 --- a/pk3DS.WinForms/pk3DS.WinForms.csproj +++ b/pk3DS.WinForms/pk3DS.WinForms.csproj @@ -2,7 +2,7 @@ WinExe - net8.0-windows + net10.0-windows true diff --git a/pk3DS.sln b/pk3DS.sln deleted file mode 100644 index 08c862d..0000000 --- a/pk3DS.sln +++ /dev/null @@ -1,27 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.9.34902.65 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "pk3DS.Core", "pk3DS.Core\pk3DS.Core.csproj", "{053212FC-2D93-427B-8695-78EC87E4C43C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "pk3DS.WinForms", "pk3DS.WinForms\pk3DS.WinForms.csproj", "{C4CB2488-2DB9-489F-8B02-A8E872C6C6AB}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C4CB2488-2DB9-489F-8B02-A8E872C6C6AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C4CB2488-2DB9-489F-8B02-A8E872C6C6AB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C4CB2488-2DB9-489F-8B02-A8E872C6C6AB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C4CB2488-2DB9-489F-8B02-A8E872C6C6AB}.Release|Any CPU.Build.0 = Release|Any CPU - {053212FC-2D93-427B-8695-78EC87E4C43C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {053212FC-2D93-427B-8695-78EC87E4C43C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {053212FC-2D93-427B-8695-78EC87E4C43C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {053212FC-2D93-427B-8695-78EC87E4C43C}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/pk3DS.slnx b/pk3DS.slnx new file mode 100644 index 0000000..b3ead24 --- /dev/null +++ b/pk3DS.slnx @@ -0,0 +1,7 @@ + + + + + + +