diff --git a/Cpp2IL.Core.Tests/Cpp2IL.Core.Tests.csproj b/Cpp2IL.Core.Tests/Cpp2IL.Core.Tests.csproj index 8f1d1c5e..8ee5b0e1 100644 --- a/Cpp2IL.Core.Tests/Cpp2IL.Core.Tests.csproj +++ b/Cpp2IL.Core.Tests/Cpp2IL.Core.Tests.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable false diff --git a/Cpp2IL.Core/Cpp2IL.Core.csproj b/Cpp2IL.Core/Cpp2IL.Core.csproj index efbc80a8..5d13a057 100644 --- a/Cpp2IL.Core/Cpp2IL.Core.csproj +++ b/Cpp2IL.Core/Cpp2IL.Core.csproj @@ -16,7 +16,7 @@ true git https://github.com/SamboyCoding/Cpp2IL.git - net8.0;net7.0;net6.0;netstandard2.0 + net9.0;net8.0;net7.0;net6.0;netstandard2.0 Cpp2IL.Core 2022.1.0 diff --git a/Cpp2IL.Core/Extensions/StreamExtensions.cs b/Cpp2IL.Core/Extensions/StreamExtensions.cs index 95e2c205..c5141c12 100644 --- a/Cpp2IL.Core/Extensions/StreamExtensions.cs +++ b/Cpp2IL.Core/Extensions/StreamExtensions.cs @@ -19,9 +19,19 @@ public static uint ReadUnityCompressedUint(this Stream stream) if (b == 240) { //Full Uint +#if NET7_0_OR_GREATER + Span buffer = stackalloc byte[4]; + stream.ReadExactly(buffer); + return BitConverter.ToUInt32(buffer); +#elif NET5_0_OR_GREATER + Span buffer = stackalloc byte[4]; + stream.Read(buffer); + return BitConverter.ToUInt32(buffer); +#else var buffer = new byte[4]; stream.Read(buffer, 0, 4); return BitConverter.ToUInt32(buffer, 0); +#endif } //Special constant values diff --git a/Cpp2IL.Plugin.BuildReport/Cpp2IL.Plugin.BuildReport.csproj b/Cpp2IL.Plugin.BuildReport/Cpp2IL.Plugin.BuildReport.csproj index 33111a47..5b6400ec 100644 --- a/Cpp2IL.Plugin.BuildReport/Cpp2IL.Plugin.BuildReport.csproj +++ b/Cpp2IL.Plugin.BuildReport/Cpp2IL.Plugin.BuildReport.csproj @@ -1,7 +1,7 @@ - net7.0 + net9.0 enable enable embedded diff --git a/Cpp2IL.Plugin.ControlFlowGraph/Cpp2IL.Plugin.ControlFlowGraph.csproj b/Cpp2IL.Plugin.ControlFlowGraph/Cpp2IL.Plugin.ControlFlowGraph.csproj index fbddfdea..3574ea64 100644 --- a/Cpp2IL.Plugin.ControlFlowGraph/Cpp2IL.Plugin.ControlFlowGraph.csproj +++ b/Cpp2IL.Plugin.ControlFlowGraph/Cpp2IL.Plugin.ControlFlowGraph.csproj @@ -1,7 +1,7 @@  - net7.0 + net9.0 enable enable embedded diff --git a/Cpp2IL.Plugin.StrippedCodeRegSupport/Cpp2IL.Plugin.StrippedCodeRegSupport.csproj b/Cpp2IL.Plugin.StrippedCodeRegSupport/Cpp2IL.Plugin.StrippedCodeRegSupport.csproj index 30f47d37..f3aa674e 100644 --- a/Cpp2IL.Plugin.StrippedCodeRegSupport/Cpp2IL.Plugin.StrippedCodeRegSupport.csproj +++ b/Cpp2IL.Plugin.StrippedCodeRegSupport/Cpp2IL.Plugin.StrippedCodeRegSupport.csproj @@ -1,7 +1,7 @@ - net7.0 + net9.0 enable enable diff --git a/Cpp2IL/Cpp2IL.csproj b/Cpp2IL/Cpp2IL.csproj index a98060e1..8043c147 100644 --- a/Cpp2IL/Cpp2IL.csproj +++ b/Cpp2IL/Cpp2IL.csproj @@ -10,7 +10,7 @@ enable Exe true - net7.0;net472 + net9.0;net472 2022.1.0 true diff --git a/LibCpp2IL/LibCpp2IL.csproj b/LibCpp2IL/LibCpp2IL.csproj index 71d41e51..49d3cdd3 100644 --- a/LibCpp2IL/LibCpp2IL.csproj +++ b/LibCpp2IL/LibCpp2IL.csproj @@ -17,7 +17,7 @@ true Library for interacting with IL2CPP metadata and binaries Debug;Release - net8.0;net7.0;net6.0;netstandard2.0 + net9.0;net8.0;net7.0;net6.0;netstandard2.0 true diff --git a/LibCpp2ILTests/LibCpp2ILTests.csproj b/LibCpp2ILTests/LibCpp2ILTests.csproj index 35bd6237..7fcb47a5 100644 --- a/LibCpp2ILTests/LibCpp2ILTests.csproj +++ b/LibCpp2ILTests/LibCpp2ILTests.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 false diff --git a/WasmDisassembler/WasmDisassembler.csproj b/WasmDisassembler/WasmDisassembler.csproj index 498ef9d3..14c5511c 100644 --- a/WasmDisassembler/WasmDisassembler.csproj +++ b/WasmDisassembler/WasmDisassembler.csproj @@ -15,7 +15,7 @@ https://github.com/SamboyCoding/Cpp2IL.git true Simple, zero-dependency disassembler for WebAssembly bytecode - net8.0;net7.0;net6.0;netstandard2.0 + net9.0;net8.0;net7.0;net6.0;netstandard2.0 diff --git a/do-release.ps1 b/do-release.ps1 index 39be0fc1..3383f0df 100644 --- a/do-release.ps1 +++ b/do-release.ps1 @@ -44,15 +44,15 @@ Write-Host "Building Cpp2IL release version $fullVersionString" Write-Host " Building Cpp2IL - Windows, Standalone .NET" -$null = dotnet publish -c Release -f "net7.0" -r "win-x64" /p:VersionSuffix=$version /p:PublishSingleFile=true --self-contained +$null = dotnet publish -c Release -f "net9.0" -r "win-x64" /p:VersionSuffix=$version /p:PublishSingleFile=true --self-contained Write-Host " Building Cpp2IL - Linux, Standalone .NET" -$null = dotnet publish -c Release -f "net7.0" -r "linux-x64" /p:VersionSuffix=$version /p:PublishSingleFile=true --self-contained +$null = dotnet publish -c Release -f "net9.0" -r "linux-x64" /p:VersionSuffix=$version /p:PublishSingleFile=true --self-contained Write-Host " Building Cpp2IL - MacOS, Standalone .NET" -$null = dotnet publish -c Release -f "net7.0" -r "osx-x64" /p:VersionSuffix=$version /p:PublishSingleFile=true --self-contained +$null = dotnet publish -c Release -f "net9.0" -r "osx-x64" /p:VersionSuffix=$version /p:PublishSingleFile=true --self-contained Write-Host " Building Cpp2IL - Windows, .NET Framework" @@ -92,9 +92,9 @@ Write-Host "Moving files to artifacts directory" $null = New-Item -ItemType Directory -Force -Path $ArtifactsDir -CopyAndRename "net7.0" "win-x64" "Windows" ".exe" -CopyAndRename "net7.0" "linux-x64" "Linux" "" -CopyAndRename "net7.0" "osx-x64" "OSX" "" +CopyAndRename "net9.0" "win-x64" "Windows" ".exe" +CopyAndRename "net9.0" "linux-x64" "Linux" "" +CopyAndRename "net9.0" "osx-x64" "OSX" "" ZipAndRename "net472" "win-x64" "Windows-Netframework472" ".exe" Write-Host "Done!" diff --git a/global.json b/global.json index 2ddda36c..485649e1 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,7 @@ { "sdk": { - "version": "8.0.0", + "version": "9.0.0", "rollForward": "latestMinor", "allowPrerelease": false } -} \ No newline at end of file +}