Skip to content

Streamline .NET SDK upgrade process and remove CodeAnalysis checks - #19892

Merged
gvkries merged 5 commits into
gvkries/roslyn-compatibilityfrom
gvkries/update-setup-dotnet
Sep 24, 2026
Merged

gvkries merged 5 commits into
gvkries/roslyn-compatibilityfrom
gvkries/update-setup-dotnet

Conversation

@gvkries

@gvkries gvkries commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

This pull request updates the .NET SDK versioning and CodeAnalysis package management process for the repository, focusing on stricter SDK version pinning in CI, optionalizing CodeAnalysis package updates, and removing the legacy version verification script. The documentation and templates have also been revised to reflect these workflow changes.

CI/CD and SDK Version Pinning:

  • CI workflows (main_ci.yml, pr_ci.yml) now strictly enforce the use of the exact .NET SDK version specified in global.json by removing the rollForward property and verifying the installed SDK version matches exactly. This replaces the previous CodeAnalysis version verification step. ([[1]](https://github.com/OrchardCMS/OrchardCore/pull/19892/files#diff-147aeb95e5b56b08e26856c3e9d80fcdafb4ee2db57026281ac511dc68482b8aR31-R50), [[2]](https://github.com/OrchardCMS/OrchardCore/pull/19892/files#diff-1153a5676594ad20522a7686e7e94a258891fe87611bafcd10ec0f3943c219b8R23-R42))
  • The custom GitHub Action (setup-dotnet/action.yml) is updated to install the SDK version from global.json, ensuring consistency between local and CI environments. ([.github/actions/setup-dotnet/action.ymlR9-R11](https://github.com/OrchardCMS/OrchardCore/pull/19892/files#diff-7978921ed7153ba992ebf38332bdd64fe6f3acb10a452b2978859c5a835ea74bR9-R11))

CodeAnalysis Package Management:

  • CodeAnalysis package updates in Directory.Packages.props are now marked as optional when upgrading the SDK, and the packages are updated to version 5.9.0 to align with SDK 10.0.4xx+. ([[1]](https://github.com/OrchardCMS/OrchardCore/pull/19892/files#diff-e9dfca7eda99b59a6ba7ba78a18fb8b3a0b2f8cf0b818c163468e2da8bce7343L12-R20), [[2]](https://github.com/OrchardCMS/OrchardCore/pull/19892/files#diff-5baf5f9e448ad54ab25a091adee0da05d4d228481c9200518fcb1b53a65d4156L90-R92))
  • The legacy build/verify-codeanalysis-versions.ps1 script for enforcing CodeAnalysis package compatibility with the SDK has been removed. ([build/verify-codeanalysis-versions.ps1L1-L171](https://github.com/OrchardCMS/OrchardCore/pull/19892/files#diff-d8d1fcb10847869cbe152a92632e4d72a10d03090efbc1ba8070cd9ad9298288L1-L171))

Documentation and Template Updates:

  • The SDK upgrade guide (src/docs/guides/upgrading-sdk-version/README.md) and the issue template for target frameworks have been updated to reflect the new workflow: updating the SDK version in both global.json and the GitHub Action, making CodeAnalysis package updates optional, and removing references to the verification script. Troubleshooting and upgrade steps have been clarified. ([[1]](https://github.com/OrchardCMS/OrchardCore/pull/19892/files#diff-c91c3589f89786446754da8d6533b4056e95a27715b655507434f17f92402c1bL10-R12), [[2]](https://github.com/OrchardCMS/OrchardCore/pull/19892/files#diff-c91c3589f89786446754da8d6533b4056e95a27715b655507434f17f92402c1bL51-L52), [[3]](https://github.com/OrchardCMS/OrchardCore/pull/19892/files#diff-c91c3589f89786446754da8d6533b4056e95a27715b655507434f17f92402c1bL61-R79), [[4]](https://github.com/OrchardCMS/OrchardCore/pull/19892/files#diff-c91c3589f89786446754da8d6533b4056e95a27715b655507434f17f92402c1bL116-R106), [[5]](https://github.com/OrchardCMS/OrchardCore/pull/19892/files#diff-c91c3589f89786446754da8d6533b4056e95a27715b655507434f17f92402c1bL141-R141), [[6]](https://github.com/OrchardCMS/OrchardCore/pull/19892/files#diff-e9dfca7eda99b59a6ba7ba78a18fb8b3a0b2f8cf0b818c163468e2da8bce7343L12-R20))

These changes streamline SDK version management, reduce manual steps, and make the upgrade process more robust and easier to follow.

Centralize SDK version in setup-dotnet action for CI/CD alignment with global.json. Make CodeAnalysis package updates optional; remove verification script, related CI steps, and documentation. Update guides and checklists to reflect new process and emphasize SDK version sync.
Added DOTNET_ROLL_FORWARD: Disable to main_ci.yml and pr_ci.yml to prevent SDK roll-forward during CI builds. Inserted dotnet --version before build steps to log the SDK version in both workflows. No other changes made.
Replaced DOTNET_ROLL_FORWARD: Disable with DOTNET_MULTILEVEL_LOOKUP: 0 in main_ci.yml and pr_ci.yml. Added a step to verify the .NET SDK version matches global.json, failing the build if there is a mismatch.
Removed DOTNET_MULTILEVEL_LOOKUP: 0 from main_ci.yml and pr_ci.yml to restore default .NET SDK lookup behavior. Added a "Pin global.json SDK in CI" step to both workflows that strips the rollForward property from global.json, ensuring CI uses the exact SDK version specified.
@gvkries
gvkries marked this pull request as ready for review September 24, 2026 17:46
@gvkries
gvkries merged commit 808cc7c into gvkries/roslyn-compatibility Sep 24, 2026
6 of 8 checks passed
@gvkries
gvkries deleted the gvkries/update-setup-dotnet branch September 24, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant