Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 12, 2025

Upgrades all projects from .NET 8 to .NET 10, updates CI workflows, and sets SDK version.

Changes

  • Project files: Updated TargetFrameworks from net8.0 to net10.0 in all 4 .csproj files
  • SDK configuration: Created global.json specifying SDK version 10.0.100 with latestFeature rollForward
  • CI workflows: Updated all GitHub Actions jobs in dotnet.yml to use dotnet-version: 10.0.x
  • Documentation: Updated README.md .NET version references (dependencies and development setup)

Known Issue

WebApi integration tests fail with System.InvalidOperationException: The PipeWriter 'ResponseBodyPipeWriter' does not implement PipeWriter.UnflushedBytes due to breaking changes in .NET 10's JSON serialization pipeline. Core library (29/29 tests) builds and passes. This will resolve when ASP.NET Core packages are updated for .NET 10 compatibility.

Original prompt

Upgrade the repository Codeuctivity/PdfAValidatorApi to target .NET 10 and update CI/Dockerfiles accordingly.

Scope and required changes:

  1. Update all project files (.csproj, Directory.Build.props if present) to target .NET 10 using TargetFramework or TargetFrameworks="net10.0". Replace previous target frameworks (e.g., net7.0, net8.0) with net10.0. For multi-targeted projects, add net10.0 to the list.

  2. Update global.json (if present) to reference a .NET SDK 10.x version. If global.json does not exist, create one at repository root with a recommended SDK version placeholder "10.0.100" (the agent may adjust to the latest stable 10.x available). Example:
    {
    "sdk": {
    "version": "10.0.100",
    "rollForward": "latestFeature"
    }
    }

  3. Update GitHub Actions workflows in .github/workflows/*.yml to use setup-dotnet with dotnet-version: '10.0.x' or '10' and to restore/build/test against net10.0. If the workflows use matrixes, add or replace entries to include 10.0.

  4. Update Dockerfiles to use .NET 10 base images (mcr.microsoft.com/dotnet/aspnet:10.0 and mcr.microsoft.com/dotnet/sdk:10.0 for build images) and adjust any build/publish commands to use "dotnet publish -c Release -o /app --framework net10.0" where appropriate.

  5. Ensure the solution files or any tooling files that reference target frameworks are updated (e.g., README build instructions, CI cache keys that include framework versions) and update them if found.

  6. Run dotnet restore and dotnet build on CI; if any package references are incompatible, keep the change to project files only and let the build reveal further necessary package upgrades.

  7. Create a feature branch named upgrade/net10 from main and open a pull request titled "Upgrade repository to .NET 10" with a descriptive body summarizing the changes and listing files modified.

Notes for the coding agent implementing the PR:

  • Modify only files necessary to upgrade to .NET 10: .csproj files, Directory.Build.props, global.json, .github/workflows/*.yml, Dockerfile(s), and README references.
  • Where a project multi-targets and includes framework-specific constants or conditional package references, preserve conditional logic and add net10.0 alongside existing frameworks unless the project is single-targeted in which case replace it.
  • If a Dockerfile pins a specific SDK/runtime patch version, update to the corresponding 10.0 tag without pinning to a patch (e.g., mcr.microsoft.com/dotnet/aspnet:10.0).
  • Update any CI caching keys that include dotnet-version/framework strings to include or switch to net10.0 to avoid cache misses.

Please create the branch upgrade/net10 from main, commit the changes, push the branch, and open the pull request targeting main with title: "Upgrade repository to .NET 10" and a body that explains what was changed and why.

Do not create release notes.

Repository: Codeuctivity/PdfAValidatorApi

This pull request was created as a result of the following prompt from Copilot chat.

Upgrade the repository Codeuctivity/PdfAValidatorApi to target .NET 10 and update CI/Dockerfiles accordingly.

Scope and required changes:

  1. Update all project files (.csproj, Directory.Build.props if present) to target .NET 10 using TargetFramework or TargetFrameworks="net10.0". Replace previous target frameworks (e.g., net7.0, net8.0) with net10.0. For multi-targeted projects, add net10.0 to the list.

  2. Update global.json (if present) to reference a .NET SDK 10.x version. If global.json does not exist, create one at repository root with a recommended SDK version placeholder "10.0.100" (the agent may adjust to the latest stable 10.x available). Example:
    {
    "sdk": {
    "version": "10.0.100",
    "rollForward": "latestFeature"
    }
    }

  3. Update GitHub Actions workflows in .github/workflows/*.yml to use setup-dotnet with dotnet-version: '10.0.x' or '10' and to restore/build/test against net10.0. If the workflows use matrixes, add or replace entries to include 10.0.

  4. Update Dockerfiles to use .NET 10 base images (mcr.microsoft.com/dotnet/aspnet:10.0 and mcr.microsoft.com/dotnet/sdk:10.0 for build images) and adjust any build/publish commands to use "dotnet publish -c Release -o /app --framework net10.0" where appropriate.

  5. Ensure the solution files or any tooling files that reference target frameworks are updated (e.g., README build instructions, CI cache keys that include framework versions) and update them if found.

  6. Run dotnet restore and dotnet build on CI; if any package references are incompatible, keep the change to project files only and let the build reveal further necessary package upgrades.

  7. Create a feature branch named upgrade/net10 from main and open a pull request titled "Upgrade repository to .NET 10" with a descriptive body summarizing the changes and listing files modified.

Notes for the coding agent implementing the PR:

  • Modify only files necessary to upgrade to .NET 10: .csproj files, Directory.Build.props, global.json, .github/workflows/*.yml, Dockerfile(s), and README references.
  • Where a project multi-targets and includes framework-specific constants or conditional package references, preserve conditional logic and add net10.0 alongside existing frameworks unless the project is single-targeted in which case replace it.
  • If a Dockerfile pins a specific SDK/runtime patch version, update to the corresponding 10.0 tag without pinning to a patch (e.g., mcr.microsoft.com/dotnet/aspnet:10.0).
  • Update any CI caching keys that include dotnet-version/framework strings to include or switch to net10.0 to avoid cache misses.

Please create the branch upgrade/net10 from main, commit the changes, push the branch, and open the pull request targeting main with title: "Upgrade repository to .NET 10" and a body that explains what was changed and why.

Do not create release notes.

Repository: Codeuctivity/PdfAValidatorApi


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: stesee <168659+stesee@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade repository to target .NET 10 and update CI Upgrade to .NET 10 Dec 12, 2025
Copilot AI requested a review from stesee December 12, 2025 11:18
@github-actions
Copy link
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

1 similar comment
@github-actions
Copy link
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@stesee stesee closed this Dec 13, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants