Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 31, 2025

CI workflow needs explicit .NET 8, 9, and 10 SDK setup to support multi-version testing requirements.

Changes

  • global.json: Updated SDK version from 9.0.306 to 10.0.101
  • ci.yml: Simplified .NET setup to use a single step with global-json-file: "global.json" (for .NET 10.0.101) plus additional versions 9.0.x and 8.0.x via multi-line dotnet-version parameter
  • publish.yml: No changes (uses only global-json-file: "global.json" as the publish workflow doesn't run tests)

This ensures all required SDK versions (8, 9, and 10) are available in the CI workflow for testing the library's multi-target framework build (net462, net8.0, netstandard2.0), while keeping the publish workflow simple with only the version from global.json.

Original prompt

Running tests requires .NET 8, 9 and 10. Can you update the CI to be sure they are available?


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: geraldbarre-workleap <240971877+geraldbarre-workleap@users.noreply.github.com>
Copilot AI changed the title [WIP] Update CI to support .NET versions 8, 9, and 10 Ensure .NET 8, 9, and 10 SDKs are available in CI workflows Dec 31, 2025
@geraldbarre-workleap
Copy link

@copilot .github/workflows/publish.yml:35 the publish workflow doesn't run the tests, so it only needs the framework from the global.json file.

.github/workflows/ci.yml:32 You can simplify that.

    - name: Setup .NET
      uses: actions/setup-dotnet@v5
      with:
        global-json-file: global.json
        dotnet-version: |
          9.0.x
          8.0.x

Co-authored-by: geraldbarre-workleap <240971877+geraldbarre-workleap@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 31, 2025

@copilot .github/workflows/publish.yml:35 the publish workflow doesn't run the tests, so it only needs the framework from the global.json file.

...

Updated in commit 0daea59:

  • ci.yml: Simplified to single .NET setup step with global.json + additional versions (10.0.x and 8.0.x)
  • publish.yml: Reverted to original configuration using only global.json

Co-authored-by: geraldbarre-workleap <240971877+geraldbarre-workleap@users.noreply.github.com>
Copilot AI changed the title Ensure .NET 8, 9, and 10 SDKs are available in CI workflows Ensure .NET 8, 9, and 10 SDKs are available in CI workflow Dec 31, 2025
@geraldbarre-workleap
Copy link

@copilot Can you also update the SDK in the global.json file to 10.0.101, and update the setup .NET step to install 9 instead of 10

…of 10

Co-authored-by: geraldbarre-workleap <240971877+geraldbarre-workleap@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 31, 2025

@copilot Can you also update the SDK in the global.json file to 10.0.101, and update the setup .NET step to install 9 instead of 10

Updated in commit 23f8836:

  • global.json: SDK version changed from 9.0.306 to 10.0.101
  • ci.yml: Changed dotnet-version to install 9.0.x instead of 10.0.x (10 now comes from global.json)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR attempts to update the CI workflow to ensure .NET 8, 9, and 10 SDKs are available for testing, but there appears to be a significant mismatch between the PR's stated purpose and the actual project requirements.

Key concerns:

  • The project only targets net8.0, net462, and netstandard2.0 frameworks - there are no .NET 9 or .NET 10 target frameworks in the codebase
  • The global.json update changes the required SDK from 9.0.306 to 10.0.101 without clear justification
  • Installing multiple SDK versions (8, 9, and 10) when only .NET 8 target frameworks exist adds unnecessary CI overhead

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
global.json Updates SDK version to 10.0.101, despite the project not targeting any .NET 10 frameworks
.github/workflows/ci.yml Adds .NET setup step to install SDKs for versions 8, 9, and 10, though only .NET 8 target frameworks exist in the project

{
"sdk": {
"version": "9.0.306",
"version": "10.0.101",
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SDK version is being updated from 9.0.306 to 10.0.101, but the project files do not target any .NET 10 frameworks. The main library targets net462, net8.0, and netstandard2.0, while the test project targets net8.0 (and net462 on Windows). There is no evidence in the codebase that .NET 10 is required.

Additionally, this change contradicts the project's documented requirement of .NET 9.0.304 SDK. If there's a specific reason for requiring .NET 10 SDK despite not targeting net10.0 frameworks, this should be documented in the PR description or commit message.

Copilot uses AI. Check for mistakes.
Comment on lines +32 to +38
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
global-json-file: "global.json"
dotnet-version: |
9.0.x
8.0.x
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI workflow is being configured to install .NET 8.0.x, 9.0.x, and 10.0.101 (from global.json), but the project does not target .NET 9 or .NET 10 frameworks. The main library targets net462, net8.0, and netstandard2.0, while the test project only targets net8.0 (and net462 on Windows).

Installing SDK versions 9.0.x and 10.0.x is unnecessary and adds overhead to the CI pipeline. Only .NET 8.0.x SDK should be required to build and test this project. If there's a specific reason why newer SDKs are needed (e.g., for tooling or build features), this should be documented.

Copilot uses AI. Check for mistakes.
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.

2 participants