From 0da16617578b2a0e312c326a6880599382817492 Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 14:32:30 +0200 Subject: [PATCH 01/24] Update BC DevTools setup and package references for netstandard2.1 and net8.0 --- .github/workflows/pr-validation.yml | 14 ++++++++--- .github/workflows/release-and-publish.yml | 14 ++++++++--- src/RoslynTestKit/RoslynTestKit.csproj | 29 +++++++++++++++++++---- 3 files changed, 46 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index f830df1..0e4fb98 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -53,11 +53,19 @@ jobs: with: useConfigFile: true - - name: Setup BC DevTools - id: setup-bc-devtools + - name: Setup BC DevTools (netstandard2.1) + id: setup-bc-devtools-netstandard21 uses: ./.github/actions/setup-bc-devtools with: - version-number: '10.0.687650' + version-number: '12.0.875970' + target-path: 'Microsoft.Dynamics.BusinessCentral.Development.Tools/netstandard2.1' + + - name: Setup BC DevTools (net8.0) + id: setup-bc-devtools-net80 + uses: ./.github/actions/setup-bc-devtools + with: + version-number: '16.0.1463980' + target-path: 'Microsoft.Dynamics.BusinessCentral.Development.Tools/net8.0' - name: Restore run: dotnet restore src/RoslynTestKit.sln diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index cb7a400..c76a757 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -78,11 +78,19 @@ jobs: useConfigFile: true overrideConfig: ${{ steps.gv.outputs.override }} - - name: Setup BC DevTools - id: setup-bc-devtools + - name: Setup BC DevTools (netstandard2.1) + id: setup-bc-devtools-netstandard21 uses: ./.github/actions/setup-bc-devtools with: - version-number: '10.0.687650' + version-number: '12.0.875970' + target-path: 'Microsoft.Dynamics.BusinessCentral.Development.Tools/netstandard2.1' + + - name: Setup BC DevTools (net8.0) + id: setup-bc-devtools-net80 + uses: ./.github/actions/setup-bc-devtools + with: + version-number: '16.0.1463980' + target-path: 'Microsoft.Dynamics.BusinessCentral.Development.Tools/net8.0' - name: Restore run: dotnet restore src/RoslynTestKit.sln diff --git a/src/RoslynTestKit/RoslynTestKit.csproj b/src/RoslynTestKit/RoslynTestKit.csproj index 6ebc241..d6ec405 100644 --- a/src/RoslynTestKit/RoslynTestKit.csproj +++ b/src/RoslynTestKit/RoslynTestKit.csproj @@ -23,21 +23,40 @@ enable - - - + + + + + + False - ..\..\Microsoft.Dynamics.BusinessCentral.Development.Tools\Microsoft.Dynamics.Nav.CodeAnalysis.dll + ..\..\Microsoft.Dynamics.BusinessCentral.Development.Tools\netstandard2.1\Microsoft.Dynamics.Nav.CodeAnalysis.dll False False - ..\..\Microsoft.Dynamics.BusinessCentral.Development.Tools\Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.dll + ..\..\Microsoft.Dynamics.BusinessCentral.Development.Tools\netstandard2.1\Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.dll False + + + + + + + False + ..\..\Microsoft.Dynamics.BusinessCentral.Development.Tools\net8.0\Microsoft.Dynamics.Nav.CodeAnalysis.dll + False + + + False + ..\..\Microsoft.Dynamics.BusinessCentral.Development.Tools\net8.0\Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.dll + False + + \ No newline at end of file From 10cdad77b4c04ce6ac339eea5ba1e6559ed41762 Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 14:44:13 +0200 Subject: [PATCH 02/24] Remove GeneratePackageOnBuild property from project file --- src/RoslynTestKit/RoslynTestKit.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/RoslynTestKit/RoslynTestKit.csproj b/src/RoslynTestKit/RoslynTestKit.csproj index d6ec405..e92b035 100644 --- a/src/RoslynTestKit/RoslynTestKit.csproj +++ b/src/RoslynTestKit/RoslynTestKit.csproj @@ -2,7 +2,6 @@ netstandard2.1;net8.0 true - true true true snupkg From 8e4a1f0dd3619c98471ffdfa0b5abcc1e9294b97 Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 14:54:03 +0200 Subject: [PATCH 03/24] Add deterministic build option to CI workflows --- .github/workflows/pr-validation.yml | 3 ++- .github/workflows/release-and-publish.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 0e4fb98..077ce67 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -70,10 +70,11 @@ jobs: - name: Restore run: dotnet restore src/RoslynTestKit.sln - - name: Build (versioned) + - name: Build run: > dotnet build src/RoslynTestKit.sln --no-restore --configuration Release /p:ContinuousIntegrationBuild=true + /p:Deterministic=true /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} /p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemVer }} /p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index c76a757..3f96bf8 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -99,6 +99,7 @@ jobs: run: > dotnet build src/RoslynTestKit.sln --no-restore --configuration Release /p:ContinuousIntegrationBuild=true + /p:Deterministic=true /p:RepositoryBranch=${{ github.ref_name }} /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} From 9c1bf615f1c6a74324134fc13f86e74ea4cc7bba Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 14:56:06 +0200 Subject: [PATCH 04/24] Add portable debug type to project file --- src/RoslynTestKit/RoslynTestKit.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/RoslynTestKit/RoslynTestKit.csproj b/src/RoslynTestKit/RoslynTestKit.csproj index e92b035..f7d9d9a 100644 --- a/src/RoslynTestKit/RoslynTestKit.csproj +++ b/src/RoslynTestKit/RoslynTestKit.csproj @@ -2,6 +2,7 @@ netstandard2.1;net8.0 true + portable true true snupkg From 7708da015a40a6924b9cbc9036b01d2baf068ed4 Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 15:02:54 +0200 Subject: [PATCH 05/24] Enable deterministic builds in project and CI workflows --- .github/workflows/pr-validation.yml | 1 - .github/workflows/release-and-publish.yml | 1 - src/RoslynTestKit/RoslynTestKit.csproj | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 077ce67..6c1e903 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -74,7 +74,6 @@ jobs: run: > dotnet build src/RoslynTestKit.sln --no-restore --configuration Release /p:ContinuousIntegrationBuild=true - /p:Deterministic=true /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} /p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemVer }} /p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index 3f96bf8..c76a757 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -99,7 +99,6 @@ jobs: run: > dotnet build src/RoslynTestKit.sln --no-restore --configuration Release /p:ContinuousIntegrationBuild=true - /p:Deterministic=true /p:RepositoryBranch=${{ github.ref_name }} /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} diff --git a/src/RoslynTestKit/RoslynTestKit.csproj b/src/RoslynTestKit/RoslynTestKit.csproj index f7d9d9a..8982d59 100644 --- a/src/RoslynTestKit/RoslynTestKit.csproj +++ b/src/RoslynTestKit/RoslynTestKit.csproj @@ -3,6 +3,7 @@ netstandard2.1;net8.0 true portable + true true true snupkg From 3ca55a3485e3774f288873db16bb94180f684e78 Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 15:06:16 +0200 Subject: [PATCH 06/24] Remove ContinuousIntegrationBuild property from build commands and ensure it's set in the project file --- .github/workflows/pr-validation.yml | 1 - .github/workflows/release-and-publish.yml | 1 - src/RoslynTestKit/RoslynTestKit.csproj | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 6c1e903..a3e9605 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -73,7 +73,6 @@ jobs: - name: Build run: > dotnet build src/RoslynTestKit.sln --no-restore --configuration Release - /p:ContinuousIntegrationBuild=true /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} /p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemVer }} /p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index c76a757..780df99 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -98,7 +98,6 @@ jobs: - name: Build run: > dotnet build src/RoslynTestKit.sln --no-restore --configuration Release - /p:ContinuousIntegrationBuild=true /p:RepositoryBranch=${{ github.ref_name }} /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} diff --git a/src/RoslynTestKit/RoslynTestKit.csproj b/src/RoslynTestKit/RoslynTestKit.csproj index 8982d59..3e2d62f 100644 --- a/src/RoslynTestKit/RoslynTestKit.csproj +++ b/src/RoslynTestKit/RoslynTestKit.csproj @@ -2,6 +2,7 @@ netstandard2.1;net8.0 true + true portable true true From 31dd0139b764a202bf81efaf2dc5d9f3323baaea Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 15:25:02 +0200 Subject: [PATCH 07/24] Set ContinuousIntegrationBuild property in build commands for PR validation and release workflows --- .github/workflows/pr-validation.yml | 1 + .github/workflows/release-and-publish.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index a3e9605..6c1e903 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -73,6 +73,7 @@ jobs: - name: Build run: > dotnet build src/RoslynTestKit.sln --no-restore --configuration Release + /p:ContinuousIntegrationBuild=true /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} /p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemVer }} /p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index 780df99..c76a757 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -98,6 +98,7 @@ jobs: - name: Build run: > dotnet build src/RoslynTestKit.sln --no-restore --configuration Release + /p:ContinuousIntegrationBuild=true /p:RepositoryBranch=${{ github.ref_name }} /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} From b689fe560811a43bf195fa60c223907e24eb2897 Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 16:19:30 +0200 Subject: [PATCH 08/24] Set ContinuousIntegrationBuild property in pack commands for PR validation and release workflows --- .github/workflows/pr-validation.yml | 1 + .github/workflows/release-and-publish.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 6c1e903..d809552 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -81,6 +81,7 @@ jobs: - name: Pack run: > dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --no-build --configuration Release + /p:ContinuousIntegrationBuild=true /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} --output ./packages diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index c76a757..67dc9b1 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -109,6 +109,7 @@ jobs: - name: Pack run: > dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --no-build --configuration Release + /p:ContinuousIntegrationBuild=true /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} --output ./packages From 249ef4ad0e4f081d27d88e47b1074289c553a6c6 Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 16:31:12 +0200 Subject: [PATCH 09/24] Remove ContinuousIntegrationBuild property from project file --- src/RoslynTestKit/RoslynTestKit.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/RoslynTestKit/RoslynTestKit.csproj b/src/RoslynTestKit/RoslynTestKit.csproj index 3e2d62f..8982d59 100644 --- a/src/RoslynTestKit/RoslynTestKit.csproj +++ b/src/RoslynTestKit/RoslynTestKit.csproj @@ -2,7 +2,6 @@ netstandard2.1;net8.0 true - true portable true true From 5843e7e67d5e12c639f654c9983d928f1292d660 Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 16:33:22 +0200 Subject: [PATCH 10/24] Add repository branch and commit information to pack commands in workflows --- .github/workflows/pr-validation.yml | 2 ++ .github/workflows/release-and-publish.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index d809552..28fd78d 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -83,6 +83,8 @@ jobs: dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --no-build --configuration Release /p:ContinuousIntegrationBuild=true /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} + /p:RepositoryBranch=${{ github.ref_name }} + /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} --output ./packages - name: Validate package manifest diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index 67dc9b1..91c401f 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -111,6 +111,7 @@ jobs: dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --no-build --configuration Release /p:ContinuousIntegrationBuild=true /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} + /p:RepositoryBranch=${{ github.ref_name }} /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} --output ./packages From 8e3b35bc84d5bf4ede01618ba03eca28cd2f8e41 Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 16:37:18 +0200 Subject: [PATCH 11/24] Add Deterministic build property and update versioning in PR validation and release workflows --- .github/workflows/pr-validation.yml | 7 ++++++- .github/workflows/release-and-publish.yml | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 28fd78d..79ed1fc 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -74,17 +74,22 @@ jobs: run: > dotnet build src/RoslynTestKit.sln --no-restore --configuration Release /p:ContinuousIntegrationBuild=true + /p:Deterministic=true /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} /p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemVer }} /p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} - name: Pack run: > - dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --no-build --configuration Release + dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --configuration Release /p:ContinuousIntegrationBuild=true + /p:Deterministic=true /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} /p:RepositoryBranch=${{ github.ref_name }} /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} + /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} + /p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemVer }} + /p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} --output ./packages - name: Validate package manifest diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index 91c401f..bddadc0 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -99,6 +99,7 @@ jobs: run: > dotnet build src/RoslynTestKit.sln --no-restore --configuration Release /p:ContinuousIntegrationBuild=true + /p:Deterministic=true /p:RepositoryBranch=${{ github.ref_name }} /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} @@ -108,11 +109,16 @@ jobs: - name: Pack run: > - dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --no-build --configuration Release + dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --configuration Release /p:ContinuousIntegrationBuild=true + /p:Deterministic=true /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} /p:RepositoryBranch=${{ github.ref_name }} /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} + /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} + /p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemVer }} + /p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} + /p:InformationalVersion=${{ steps.gitversion.outputs.informationalVersion }} --output ./packages - name: Validate package manifest From db96ef2184564e363621e3f3d63a80deba00394a Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 16:40:00 +0200 Subject: [PATCH 12/24] Remove Build steps from PR validation and release workflows --- .github/workflows/pr-validation.yml | 9 --------- .github/workflows/release-and-publish.yml | 12 ------------ 2 files changed, 21 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 79ed1fc..18621bc 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -70,15 +70,6 @@ jobs: - name: Restore run: dotnet restore src/RoslynTestKit.sln - - name: Build - run: > - dotnet build src/RoslynTestKit.sln --no-restore --configuration Release - /p:ContinuousIntegrationBuild=true - /p:Deterministic=true - /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} - /p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemVer }} - /p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} - - name: Pack run: > dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --configuration Release diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index bddadc0..26732eb 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -95,18 +95,6 @@ jobs: - name: Restore run: dotnet restore src/RoslynTestKit.sln - - name: Build - run: > - dotnet build src/RoslynTestKit.sln --no-restore --configuration Release - /p:ContinuousIntegrationBuild=true - /p:Deterministic=true - /p:RepositoryBranch=${{ github.ref_name }} - /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} - /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} - /p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemVer }} - /p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} - /p:InformationalVersion=${{ steps.gitversion.outputs.informationalVersion }} - - name: Pack run: > dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --configuration Release From 9b99a1629132eb901be90f8385278681bb12028e Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 16:49:04 +0200 Subject: [PATCH 13/24] Revert changes --- .github/workflows/pr-validation.yml | 13 +++++++------ .github/workflows/release-and-publish.yml | 13 ++++++++----- src/RoslynTestKit/RoslynTestKit.csproj | 4 +--- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 18621bc..6c1e903 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -70,17 +70,18 @@ jobs: - name: Restore run: dotnet restore src/RoslynTestKit.sln - - name: Pack + - name: Build run: > - dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --configuration Release + dotnet build src/RoslynTestKit.sln --no-restore --configuration Release /p:ContinuousIntegrationBuild=true - /p:Deterministic=true - /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} - /p:RepositoryBranch=${{ github.ref_name }} - /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} /p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemVer }} /p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} + + - name: Pack + run: > + dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --no-build --configuration Release + /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} --output ./packages - name: Validate package manifest diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index 26732eb..ede522f 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -95,18 +95,22 @@ jobs: - name: Restore run: dotnet restore src/RoslynTestKit.sln - - name: Pack + - name: Build run: > - dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --configuration Release + dotnet build src/RoslynTestKit.sln --no-restore --configuration Release /p:ContinuousIntegrationBuild=true - /p:Deterministic=true - /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} /p:RepositoryBranch=${{ github.ref_name }} /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} /p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemVer }} /p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} /p:InformationalVersion=${{ steps.gitversion.outputs.informationalVersion }} + + - name: Pack + run: > + dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --no-build --configuration Release + /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} + /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} --output ./packages - name: Validate package manifest @@ -146,4 +150,3 @@ jobs: --api-key "$NUGET_API_KEY" \ --source https://api.nuget.org/v3/index.json \ --skip-duplicate - diff --git a/src/RoslynTestKit/RoslynTestKit.csproj b/src/RoslynTestKit/RoslynTestKit.csproj index 8982d59..ef98b1e 100644 --- a/src/RoslynTestKit/RoslynTestKit.csproj +++ b/src/RoslynTestKit/RoslynTestKit.csproj @@ -1,9 +1,7 @@  - netstandard2.1;net8.0 true - portable - true + true true true snupkg From a6534c660153835fbe5f5d757f5b84bb70866926 Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 16:50:55 +0200 Subject: [PATCH 14/24] Fix missing TargetFrameworks property in project file --- src/RoslynTestKit/RoslynTestKit.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/RoslynTestKit/RoslynTestKit.csproj b/src/RoslynTestKit/RoslynTestKit.csproj index ef98b1e..d6ec405 100644 --- a/src/RoslynTestKit/RoslynTestKit.csproj +++ b/src/RoslynTestKit/RoslynTestKit.csproj @@ -1,5 +1,6 @@  + netstandard2.1;net8.0 true true true From bf47fbb91c3b4d9df59a089c40659ffb17807ecd Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 16:53:17 +0200 Subject: [PATCH 15/24] Add ContinuousIntegrationBuild property for GitHub Actions --- src/RoslynTestKit/RoslynTestKit.csproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/RoslynTestKit/RoslynTestKit.csproj b/src/RoslynTestKit/RoslynTestKit.csproj index d6ec405..90fd820 100644 --- a/src/RoslynTestKit/RoslynTestKit.csproj +++ b/src/RoslynTestKit/RoslynTestKit.csproj @@ -22,6 +22,9 @@ true enable + + true + From ba92f5ebb705e6dcb489d83f9bb543edfa1fc3fc Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 17:08:03 +0200 Subject: [PATCH 16/24] Add Deterministic build property for GitHub Actions --- src/RoslynTestKit/RoslynTestKit.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/RoslynTestKit/RoslynTestKit.csproj b/src/RoslynTestKit/RoslynTestKit.csproj index 90fd820..fa1a553 100644 --- a/src/RoslynTestKit/RoslynTestKit.csproj +++ b/src/RoslynTestKit/RoslynTestKit.csproj @@ -24,6 +24,7 @@ true + true From 7207974331d5da077eb253eba580f52fce79a648 Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 17:14:58 +0200 Subject: [PATCH 17/24] Add ContinuousIntegrationBuild property to pack steps in workflows --- .github/workflows/pr-validation.yml | 3 ++- .github/workflows/release-and-publish.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 6c1e903..7e1da52 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -80,7 +80,8 @@ jobs: - name: Pack run: > - dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --no-build --configuration Release + dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --configuration Release + /p:ContinuousIntegrationBuild=true /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} --output ./packages diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index ede522f..b24dbd3 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -108,7 +108,8 @@ jobs: - name: Pack run: > - dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --no-build --configuration Release + dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --configuration Release + /p:ContinuousIntegrationBuild=true /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} --output ./packages From 95e1da827365c5d512f2ea823a7c71b0dbf59e2a Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 17:17:27 +0200 Subject: [PATCH 18/24] Update dotnet-validate tool version to 0.0.1-preview.537 in workflows --- .github/workflows/pr-validation.yml | 2 +- .github/workflows/release-and-publish.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 7e1da52..b83b41a 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -87,7 +87,7 @@ jobs: - name: Validate package manifest run: | - dotnet tool install --global dotnet-validate --version 0.0.1-preview.304 + dotnet tool install --global dotnet-validate --version 0.0.1-preview.537 dotnet-validate package local ./packages/*.nupkg - name: Upload package diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index b24dbd3..aac4654 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -116,7 +116,7 @@ jobs: - name: Validate package manifest run: | - dotnet tool install --global dotnet-validate --version 0.0.1-preview.304 + dotnet tool install --global dotnet-validate --version 0.0.1-preview.537 dotnet-validate package local ./packages/*.nupkg - name: Create GitHub Release From dade0bb8a524b26262007aef0cfe51f5de4cfaae Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 17:25:07 +0200 Subject: [PATCH 19/24] Add embedded debug type to project file --- src/RoslynTestKit/RoslynTestKit.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/RoslynTestKit/RoslynTestKit.csproj b/src/RoslynTestKit/RoslynTestKit.csproj index fa1a553..3e6ce8e 100644 --- a/src/RoslynTestKit/RoslynTestKit.csproj +++ b/src/RoslynTestKit/RoslynTestKit.csproj @@ -21,6 +21,7 @@ RoslynTestKit true enable + embedded true From 94663eefdeb6473ecbc42ba96d717b491d320bee Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 17:33:25 +0200 Subject: [PATCH 20/24] Add DotNet.ReproducibleBuilds package reference for reproducible builds --- src/RoslynTestKit/RoslynTestKit.csproj | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/RoslynTestKit/RoslynTestKit.csproj b/src/RoslynTestKit/RoslynTestKit.csproj index 3e6ce8e..10a7c15 100644 --- a/src/RoslynTestKit/RoslynTestKit.csproj +++ b/src/RoslynTestKit/RoslynTestKit.csproj @@ -27,6 +27,13 @@ true true + + + + all + runtime; build; native; contentfiles; analyzers + + From 5f462382c3536268b9f10faba9f1bb036002320b Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 17:57:21 +0200 Subject: [PATCH 21/24] Change DebugType from embedded to portable in project file --- src/RoslynTestKit/RoslynTestKit.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RoslynTestKit/RoslynTestKit.csproj b/src/RoslynTestKit/RoslynTestKit.csproj index 10a7c15..6621ba5 100644 --- a/src/RoslynTestKit/RoslynTestKit.csproj +++ b/src/RoslynTestKit/RoslynTestKit.csproj @@ -21,7 +21,7 @@ RoslynTestKit true enable - embedded + portable true From a9ec0461fec8262ec1f02ea57be8481c6ef3ea93 Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 18:02:57 +0200 Subject: [PATCH 22/24] Remove DebugType and ContinuousIntegrationBuild properties from project file --- src/RoslynTestKit/RoslynTestKit.csproj | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/RoslynTestKit/RoslynTestKit.csproj b/src/RoslynTestKit/RoslynTestKit.csproj index 6621ba5..d6ec405 100644 --- a/src/RoslynTestKit/RoslynTestKit.csproj +++ b/src/RoslynTestKit/RoslynTestKit.csproj @@ -21,19 +21,7 @@ RoslynTestKit true enable - portable - - true - true - - - - - all - runtime; build; native; contentfiles; analyzers - - From c79ff82be6e9be30890d74a0124292f803729648 Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 19:33:41 +0200 Subject: [PATCH 23/24] Refactor GitHub workflows to streamline build and packaging steps; update project file properties for better package management --- .github/workflows/pr-validation.yml | 25 +++++++++++--------- .github/workflows/release-and-publish.yml | 28 +++++++++++------------ src/RoslynTestKit/RoslynTestKit.csproj | 15 +++--------- 3 files changed, 31 insertions(+), 37 deletions(-) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index b83b41a..03aef99 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -54,14 +54,12 @@ jobs: useConfigFile: true - name: Setup BC DevTools (netstandard2.1) - id: setup-bc-devtools-netstandard21 uses: ./.github/actions/setup-bc-devtools with: version-number: '12.0.875970' target-path: 'Microsoft.Dynamics.BusinessCentral.Development.Tools/netstandard2.1' - name: Setup BC DevTools (net8.0) - id: setup-bc-devtools-net80 uses: ./.github/actions/setup-bc-devtools with: version-number: '16.0.1463980' @@ -70,19 +68,24 @@ jobs: - name: Restore run: dotnet restore src/RoslynTestKit.sln - - name: Build + - name: Pack run: > - dotnet build src/RoslynTestKit.sln --no-restore --configuration Release + dotnet pack src/RoslynTestKit/RoslynTestKit.csproj + --configuration Release + --no-restore /p:ContinuousIntegrationBuild=true - /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} + /p:PublishRepositoryUrl=true + /p:RepositoryType=git + /p:RepositoryUrl=${{ github.server_url }}/${{ github.repository }} + /p:RepositoryBranch=${{ github.ref }} + /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} + /p:EmbedUntrackedSources=true + /p:IncludeSymbols=true + /p:SymbolPackageFormat=snupkg + /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} /p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemVer }} /p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} - - - name: Pack - run: > - dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --configuration Release - /p:ContinuousIntegrationBuild=true - /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} + /p:InformationalVersion=${{ steps.gitversion.outputs.informationalVersion }} --output ./packages - name: Validate package manifest diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index aac4654..3c51263 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -79,14 +79,12 @@ jobs: overrideConfig: ${{ steps.gv.outputs.override }} - name: Setup BC DevTools (netstandard2.1) - id: setup-bc-devtools-netstandard21 uses: ./.github/actions/setup-bc-devtools with: version-number: '12.0.875970' target-path: 'Microsoft.Dynamics.BusinessCentral.Development.Tools/netstandard2.1' - name: Setup BC DevTools (net8.0) - id: setup-bc-devtools-net80 uses: ./.github/actions/setup-bc-devtools with: version-number: '16.0.1463980' @@ -95,26 +93,28 @@ jobs: - name: Restore run: dotnet restore src/RoslynTestKit.sln - - name: Build + - name: Pack run: > - dotnet build src/RoslynTestKit.sln --no-restore --configuration Release + dotnet pack src/RoslynTestKit/RoslynTestKit.csproj + --configuration Release + --no-restore /p:ContinuousIntegrationBuild=true - /p:RepositoryBranch=${{ github.ref_name }} + /p:PublishRepositoryUrl=true + /p:RepositoryType=git + /p:RepositoryUrl=${{ github.server_url }}/${{ github.repository }} + /p:RepositoryBranch=${{ github.ref }} /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} - /p:Version=${{ steps.gitversion.outputs.nuGetVersionV2 }} + /p:EmbedUntrackedSources=true + /p:IncludeSymbols=true + /p:SymbolPackageFormat=snupkg + /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} /p:AssemblyVersion=${{ steps.gitversion.outputs.assemblySemVer }} /p:FileVersion=${{ steps.gitversion.outputs.assemblySemFileVer }} /p:InformationalVersion=${{ steps.gitversion.outputs.informationalVersion }} - - - name: Pack - run: > - dotnet pack src/RoslynTestKit/RoslynTestKit.csproj --configuration Release - /p:ContinuousIntegrationBuild=true - /p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} - /p:RepositoryCommit=${{ steps.gitversion.outputs.sha }} --output ./packages - name: Validate package manifest + if: false run: | dotnet tool install --global dotnet-validate --version 0.0.1-preview.537 dotnet-validate package local ./packages/*.nupkg @@ -147,7 +147,7 @@ jobs: if [ -z "$NUGET_API_KEY" ]; then echo "NUGET_API_KEY not configured"; exit 1 fi - dotnet nuget push ./packages/*.nupkg \ + dotnet nuget push ./packages/*.nupkg ./packages/*.snupkg \ --api-key "$NUGET_API_KEY" \ --source https://api.nuget.org/v3/index.json \ --skip-duplicate diff --git a/src/RoslynTestKit/RoslynTestKit.csproj b/src/RoslynTestKit/RoslynTestKit.csproj index d6ec405..7eb3790 100644 --- a/src/RoslynTestKit/RoslynTestKit.csproj +++ b/src/RoslynTestKit/RoslynTestKit.csproj @@ -1,25 +1,16 @@  netstandard2.1;net8.0 - true - true - true - true - snupkg - Dustin Campbell, Ivan Yochev, Cezary Piątek, Christoph Stuber, Ansgar Barthel, Arthur van de Vondervoort RoslynTestKit A lightweight framework for creating unit tests for Roslyn diagnostic analyzers, code fixes and refactorings. + Dustin Campbell, Ivan Yochev, Cezary Piątek, Christoph Stuber, Ansgar Barthel, Arthur van de Vondervoort Copyright 2015-2025 by Dustin Campbell, Ivan Yochev, Cezary Piątek, Christoph Stuber, Ansgar Barthel, Arthur van de Vondervoort + true https://github.com/ALCops/RoslynTestKit/blob/master/License.txt https://github.com/ALCops/RoslynTestKit - https://github.com/ALCops/RoslynTestKit - Roslyn CodeAnalysis test testing tdd analyzer fixes refactor refactoring AL Business Central - en - en-US - + Roslyn CodeAnalysis test testing tdd analyzer fixes refactor refactoring AL BusinessCentral ALCops.RoslynTestKit RoslynTestKit - true enable From 7dee615196dbcb0968c2fb1cdcd90286c6de72dc Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Fri, 19 Sep 2025 19:35:28 +0200 Subject: [PATCH 24/24] Disable package manifest validation step in PR workflow --- .github/workflows/pr-validation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 03aef99..2a9a16a 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -89,6 +89,7 @@ jobs: --output ./packages - name: Validate package manifest + if: false run: | dotnet tool install --global dotnet-validate --version 0.0.1-preview.537 dotnet-validate package local ./packages/*.nupkg