From aff908fd81d77c098c3b893cc61465810793fa18 Mon Sep 17 00:00:00 2001 From: Maximilien Noal Date: Sat, 16 Nov 2024 10:17:54 +0100 Subject: [PATCH] chore: Migration to .NET 9 SDK Signed-off-by: Maximilien Noal --- .github/workflows/codeql.yml | 2 +- .github/workflows/nuget.yml | 2 +- .github/workflows/pr.yml | 2 +- .github/workflows/prerelease.yml | 2 +- src/Bufdio.Spice86/Bufdio.Spice86.csproj | 15 +-- src/Directory.Build.props | 23 +++- src/Directory.Packages.props | 33 +++--- src/Spice86.Core/Spice86.Core.csproj | 100 ++++++++---------- src/Spice86.Logging/Spice86.Logging.csproj | 25 ++--- src/Spice86.Shared/Spice86.Shared.csproj | 23 +--- src/Spice86.sln | 9 +- .../MemoryWrappers/DataMemoryDocument.cs | 19 +++- src/Spice86/Spice86.csproj | 21 +--- tests/Directory.Packages.props | 1 - tests/Spice86.Tests/Spice86.Tests.csproj | 2 +- 15 files changed, 121 insertions(+), 158 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f7ed1dd447..356c999569 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -63,7 +63,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: '8.0.x' + dotnet-version: '9.0.x' - run: | echo "running custom build action..." diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml index 44f30bda46..91dbf11cbc 100644 --- a/.github/workflows/nuget.yml +++ b/.github/workflows/nuget.yml @@ -22,7 +22,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: '8.0.x' + dotnet-version: '9.0.x' - name: Test with dotnet working-directory: ./src diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 1a14b2bce7..a0d889fd76 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: '8.0.x' + dotnet-version: '9.0.x' - name: Test with dotnet working-directory: ./src diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 587069d6ba..c2961ba614 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -16,7 +16,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: '8.0.x' + dotnet-version: '9.0.x' - name: Install zip uses: montudor/action-zip@v1 diff --git a/src/Bufdio.Spice86/Bufdio.Spice86.csproj b/src/Bufdio.Spice86/Bufdio.Spice86.csproj index 7d482ffed4..c2c5bc5514 100644 --- a/src/Bufdio.Spice86/Bufdio.Spice86.csproj +++ b/src/Bufdio.Spice86/Bufdio.Spice86.csproj @@ -8,21 +8,8 @@ - true - 7.0.0 + Bufdio.Spice86 Luthfi Tri Atmaja, Kevin Ferrare, Maximilien Noal, Joris van Eijden, Artjom Vejsel - Apache-2.0 - Reverse engineer and rewrite real mode dos programs - https://github.com/OpenRakis/Spice86 - https://github.com/OpenRakis/Spice86 - git - - - - - true - true - true diff --git a/src/Directory.Build.props b/src/Directory.Build.props index be2026848d..5eee29b647 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,8 +1,29 @@ - net8.0 + net9.0 enable enable + true + true nullable + $(NoWarn);NU1507 + + + + true + true + true + + + + 7.0.0 + Some breaking API changes (SegmentRegisters.cs), WIP new CFG_CPU, addtionnal memory/disasm views to the internal debugger, replaced UI DI framework with Microsoft.DI. + Kevin Ferrare, Maximilien Noal, Joris van Eijden, Artjom Vejsel + reverse-engineering;avalonia;debugger;assembly;emulator;cross-platform + Reverse engineer and rewrite real mode dos programs + https://github.com/OpenRakis/Spice86 + https://github.com/OpenRakis/Spice86 + Apache-2.0 + git \ No newline at end of file diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 456f7fe23b..c40892b5bf 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -2,19 +2,18 @@ true true - $(NoWarn);NU1507 - - + + - - - + + + - + @@ -23,13 +22,11 @@ - - + - @@ -37,20 +34,18 @@ - - - + + + - + - - - - - + + + \ No newline at end of file diff --git a/src/Spice86.Core/Spice86.Core.csproj b/src/Spice86.Core/Spice86.Core.csproj index b1f2efe278..123433d0c1 100644 --- a/src/Spice86.Core/Spice86.Core.csproj +++ b/src/Spice86.Core/Spice86.Core.csproj @@ -1,79 +1,65 @@  - true - 1591;1572;1573;1570;1587;1574 + true - - - - + + + + - true - 7.0.0 - Kevin Ferrare, Maximilien Noal, Joris van Eijden, Artjom Vejsel - Apache-2.0 - Reverse engineer and rewrite real mode dos programs - https://github.com/OpenRakis/Spice86 - https://github.com/OpenRakis/Spice86 - git - - - - true - true - true + Spice86.Core - true + true - - + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - + + + - - 2MGM.license - Always - - - 2MGM.sf2 - Always - + + 2MGM.license + Always + + + 2MGM.sf2 + Always + - - <_Parameter1>Spice86.Tests - - - <_Parameter1>DynamicProxyGenAssembly2 - + + <_Parameter1>Spice86.Tests + + + <_Parameter1>DynamicProxyGenAssembly2 + \ No newline at end of file diff --git a/src/Spice86.Logging/Spice86.Logging.csproj b/src/Spice86.Logging/Spice86.Logging.csproj index 6803e8a0ad..2ea93ea953 100644 --- a/src/Spice86.Logging/Spice86.Logging.csproj +++ b/src/Spice86.Logging/Spice86.Logging.csproj @@ -1,28 +1,15 @@  - true - 7.0.0 - Kevin Ferrare, Maximilien Noal, Joris van Eijden, Artjom Vejsel - Apache-2.0 - Reverse engineer and rewrite real mode dos programs - https://github.com/OpenRakis/Spice86 - https://github.com/OpenRakis/Spice86 - git - - - - true - true - true + Spice86.Logging - - - - + + + + - + \ No newline at end of file diff --git a/src/Spice86.Shared/Spice86.Shared.csproj b/src/Spice86.Shared/Spice86.Shared.csproj index bab8134099..2ca91ab15f 100644 --- a/src/Spice86.Shared/Spice86.Shared.csproj +++ b/src/Spice86.Shared/Spice86.Shared.csproj @@ -1,25 +1,12 @@  - true - 7.0.0 - Kevin Ferrare, Maximilien Noal, Joris van Eijden, Artjom Vejsel - Apache-2.0 - Reverse engineer and rewrite real mode dos programs - https://github.com/OpenRakis/Spice86 - https://github.com/OpenRakis/Spice86 - git - - - - true - true - true + Spice86.Shared - - - - + + + + \ No newline at end of file diff --git a/src/Spice86.sln b/src/Spice86.sln index f584247772..133a4fcb04 100644 --- a/src/Spice86.sln +++ b/src/Spice86.sln @@ -15,6 +15,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spice86.Tests", "..\tests\S EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bufdio.Spice86", "Bufdio.Spice86\Bufdio.Spice86.csproj", "{7D5BE77E-870A-411B-8B05-E52AC9D784B4}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{52A35F7D-C8DB-4690-84C6-0173E2EADD97}" + ProjectSection(SolutionItems) = preProject + Directory.Build.props = Directory.Build.props + Directory.Packages.props = Directory.Packages.props + ..\tests\Directory.Packages.props = ..\tests\Directory.Packages.props + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -49,8 +56,6 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(NestedProjects) = preSolution - EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {020167FB-AD64-4756-930F-EBF609283573} EndGlobalSection diff --git a/src/Spice86/MemoryWrappers/DataMemoryDocument.cs b/src/Spice86/MemoryWrappers/DataMemoryDocument.cs index d9b5366263..de80f3fb23 100644 --- a/src/Spice86/MemoryWrappers/DataMemoryDocument.cs +++ b/src/Spice86/MemoryWrappers/DataMemoryDocument.cs @@ -5,11 +5,12 @@ using System; -public class DataMemoryDocument : IBinaryDocument { +public sealed class DataMemoryDocument : IBinaryDocument { private readonly IMemory _memory; private readonly uint _startAddress; private readonly uint _endAddress; - + private bool _disposed; + public DataMemoryDocument(IMemory memory, uint startAddress, uint endAddress) { IsReadOnly = false; CanInsert = false; @@ -50,4 +51,18 @@ public void RemoveBytes(ulong offset, ulong length) { public void WriteBytes(ulong offset, ReadOnlySpan buffer) { _memory.WriteRam(buffer.ToArray(), (uint)(_startAddress + offset)); } + + /// + /// Does nothing + /// + public void Flush() { + //NOP + } + + /// + /// Does nothing + /// + public void Dispose() { + //NOP + } } \ No newline at end of file diff --git a/src/Spice86/Spice86.csproj b/src/Spice86/Spice86.csproj index 0eb55cb5d8..394133a2f8 100644 --- a/src/Spice86/Spice86.csproj +++ b/src/Spice86/Spice86.csproj @@ -1,37 +1,18 @@  Exe - true True - 1591;1572;1573;1570;1587;1574 true app.manifest true - CS1591 Spice86 - true - 7.0.0 - Some breaking API changes (SegmentRegisters.cs), WIP new CFG_CPU, addtionnal memory/disasm views to the internal debugger, replaced UI DI framework with Microsoft.DI. - Kevin Ferrare, Maximilien Noal, Joris van Eijden, Artjom Vejsel - Apache-2.0 - Reverse engineer and rewrite real mode DOS programs - reverse-engineering;avalonia;debugger;assembly;emulator;cross-platform - https://github.com/OpenRakis/Spice86 - https://github.com/OpenRakis/Spice86 - git - - - - true - true - true - lib\net8.0\libportaudio.dll + lib\net9.0\libportaudio.dll Always True diff --git a/tests/Directory.Packages.props b/tests/Directory.Packages.props index 7bb6f55c52..507388c666 100644 --- a/tests/Directory.Packages.props +++ b/tests/Directory.Packages.props @@ -2,7 +2,6 @@ true true - $(NoWarn);NU1507 diff --git a/tests/Spice86.Tests/Spice86.Tests.csproj b/tests/Spice86.Tests/Spice86.Tests.csproj index b301a0e1e9..30cd4f8550 100644 --- a/tests/Spice86.Tests/Spice86.Tests.csproj +++ b/tests/Spice86.Tests/Spice86.Tests.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 enable enable nullable