diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 528ca07..a44b798 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: strategy: matrix: - os: ['ubuntu-24.04', 'windows-2022'] + os: ['ubuntu-24.04', 'windows-2025'] env: Configuration: 'Release' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8169891..b8a9af4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ env: jobs: release: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: checkout @@ -28,7 +28,7 @@ jobs: - name: setup dotnet uses: actions/setup-dotnet@v5 with: - dotnet-version: 8 + dotnet-version: 10 - name: restore run: dotnet restore diff --git a/src/Directory.Build.props b/src/Directory.Build.props index d4e0975..2b1d0ad 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,10 +1,10 @@ - net6.0;net7.0;net8.0 + net8.0;net10.0 enable enable - 1.8.0 + 2.0.0 diff --git a/src/VbaCompiler/README.md b/src/VbaCompiler/README.md index 2108c5c..cc554cf 100644 --- a/src/VbaCompiler/README.md +++ b/src/VbaCompiler/README.md @@ -24,7 +24,7 @@ var macroFilePath = compiler.CompileExcelMacroFile("bin", "MyMacro.xlsm", vbaPro ### Requirements -The compiler works on .NET 6, 7 and 8 runtimes on Windows and macOS. +The compiler works on .NET 8 and 10 runtimes on Windows, Linux and macOS. ### Samples diff --git a/src/VbaCompiler/Vba/ProjectRecord.cs b/src/VbaCompiler/Vba/ProjectRecord.cs index 4aa1859..bb20fd0 100644 --- a/src/VbaCompiler/Vba/ProjectRecord.cs +++ b/src/VbaCompiler/Vba/ProjectRecord.cs @@ -9,11 +9,11 @@ public class ProjectRecord { public ProjectRecord() { - this.HostExtenders = new List() - { + this.HostExtenders = + [ Constants.HostExtender_VBE - }; - this.Modules = new List(); + ]; + this.Modules = []; } public string Id { get; set; } = ""; @@ -37,7 +37,7 @@ public ProjectRecord() /// public string VisibilityState { get; set; } = ""; - public IList HostExtenders { get; } + public List HostExtenders { get; } public ICollection Modules { get; set; } diff --git a/src/VbaCompiler/VbaCompiler.cs b/src/VbaCompiler/VbaCompiler.cs index 8c63c72..d228653 100644 --- a/src/VbaCompiler/VbaCompiler.cs +++ b/src/VbaCompiler/VbaCompiler.cs @@ -14,9 +14,9 @@ namespace vbamc { public class VbaCompiler { - private IList modules = new List(); + private List modules = []; - public IDictionary ExtendedProperties { get; set; } = new Dictionary(); + public Dictionary ExtendedProperties { get; set; } = []; public Guid ProjectId { get; set; } diff --git a/src/VbaCompiler/VbaCompiler.csproj b/src/VbaCompiler/VbaCompiler.csproj index 36f9838..f1648f0 100644 --- a/src/VbaCompiler/VbaCompiler.csproj +++ b/src/VbaCompiler/VbaCompiler.csproj @@ -10,10 +10,9 @@ - - - - + + + diff --git a/src/vbamc/Program.cs b/src/vbamc/Program.cs index b51030a..3374fb7 100644 --- a/src/vbamc/Program.cs +++ b/src/vbamc/Program.cs @@ -15,10 +15,10 @@ public static int Main(string[] args) [Required] [Option("-m|--module")] - public IEnumerable Modules { get; } = Enumerable.Empty(); + public IEnumerable Modules { get; } = []; [Option("-c|--class")] - public IEnumerable Classes { get; } = Enumerable.Empty(); + public IEnumerable Classes { get; } = []; // [Option("-d|--document")] // public string? Document { get; } @@ -39,7 +39,7 @@ public static int Main(string[] args) public string? UserProfilePath { get; } [Option("-p|--property", Description = "Extended property in the format name=value")] - public string[] ExtendedProperties { get; } = Array.Empty(); + public string[] ExtendedProperties { get; } = []; private void OnExecute() { diff --git a/src/vbamc/README.md b/src/vbamc/README.md index e6fc358..47aa3ee 100644 --- a/src/vbamc/README.md +++ b/src/vbamc/README.md @@ -11,7 +11,7 @@ vbamc --module Module.vb --class MyClass.vb --name "VBA Project" --company "ACME ### Requirements -The compiler works on .NET 6, 7 and 8 runtimes on Windows and macOS. +The compiler works on .NET 8 and 10 runtimes on Windows, Linux and macOS. ### Samples diff --git a/tests/VbaCompiler.Tests/VbaCompiler.Tests.csproj b/tests/VbaCompiler.Tests/VbaCompiler.Tests.csproj index 1f04230..aeb701c 100644 --- a/tests/VbaCompiler.Tests/VbaCompiler.Tests.csproj +++ b/tests/VbaCompiler.Tests/VbaCompiler.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net8.0;net10.0 enable false @@ -22,16 +22,13 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - diff --git a/utils/vbad/vbad.csproj b/utils/vbad/vbad.csproj index 001bb1d..54b55c0 100644 --- a/utils/vbad/vbad.csproj +++ b/utils/vbad/vbad.csproj @@ -2,14 +2,14 @@ Exe - net8.0 + net10.0 enable enable - - + + diff --git a/vbamc.sln b/vbamc.sln deleted file mode 100644 index 9417414..0000000 --- a/vbamc.sln +++ /dev/null @@ -1,58 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.1.32407.343 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "utils", "utils", "{A71B7204-5177-40D4-85E9-9191D9D0E871}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "vbad", "utils\vbad\vbad.csproj", "{9DF9B097-B6AD-4804-B77B-368BA556C8B5}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "vbamc", "src\vbamc\vbamc.csproj", "{3CA6032C-FDC1-4C35-AF3F-984BAD460C12}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{C879AB47-586B-4229-8D7C-440063943FCA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VbaCompiler.Tests", "tests\VbaCompiler.Tests\VbaCompiler.Tests.csproj", "{96CB89F7-B342-499A-8B11-0544E8CE084B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VbaCompiler", "src\VbaCompiler\VbaCompiler.csproj", "{EC2B7487-4C21-4118-A405-E4228CFF80B3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VbaCompiler.Benchmark", "tests\VbaCompiler.Benchmark\VbaCompiler.Benchmark.csproj", "{646D544C-BCA4-44CF-9C2A-F69F32B90BAF}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9DF9B097-B6AD-4804-B77B-368BA556C8B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9DF9B097-B6AD-4804-B77B-368BA556C8B5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9DF9B097-B6AD-4804-B77B-368BA556C8B5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9DF9B097-B6AD-4804-B77B-368BA556C8B5}.Release|Any CPU.Build.0 = Release|Any CPU - {3CA6032C-FDC1-4C35-AF3F-984BAD460C12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3CA6032C-FDC1-4C35-AF3F-984BAD460C12}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3CA6032C-FDC1-4C35-AF3F-984BAD460C12}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3CA6032C-FDC1-4C35-AF3F-984BAD460C12}.Release|Any CPU.Build.0 = Release|Any CPU - {96CB89F7-B342-499A-8B11-0544E8CE084B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {96CB89F7-B342-499A-8B11-0544E8CE084B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {96CB89F7-B342-499A-8B11-0544E8CE084B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {96CB89F7-B342-499A-8B11-0544E8CE084B}.Release|Any CPU.Build.0 = Release|Any CPU - {EC2B7487-4C21-4118-A405-E4228CFF80B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EC2B7487-4C21-4118-A405-E4228CFF80B3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EC2B7487-4C21-4118-A405-E4228CFF80B3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EC2B7487-4C21-4118-A405-E4228CFF80B3}.Release|Any CPU.Build.0 = Release|Any CPU - {646D544C-BCA4-44CF-9C2A-F69F32B90BAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {646D544C-BCA4-44CF-9C2A-F69F32B90BAF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {646D544C-BCA4-44CF-9C2A-F69F32B90BAF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {646D544C-BCA4-44CF-9C2A-F69F32B90BAF}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {9DF9B097-B6AD-4804-B77B-368BA556C8B5} = {A71B7204-5177-40D4-85E9-9191D9D0E871} - {96CB89F7-B342-499A-8B11-0544E8CE084B} = {C879AB47-586B-4229-8D7C-440063943FCA} - {646D544C-BCA4-44CF-9C2A-F69F32B90BAF} = {C879AB47-586B-4229-8D7C-440063943FCA} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {8451A57F-A750-4C84-BFDE-48D3CD3D5F33} - EndGlobalSection -EndGlobal diff --git a/vbamc.slnx b/vbamc.slnx new file mode 100644 index 0000000..3764002 --- /dev/null +++ b/vbamc.slnx @@ -0,0 +1,13 @@ + + + + + + + + + + + + +