Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 12, 2025

Upgrades all projects from .NET 8 to .NET 10, including CI/CD pipeline and documentation.

Changes

  • Project files: Updated TargetFrameworks to net10.0 in all .csproj files
  • SDK version: Created global.json with SDK 10.0.100 and rollForward: latestFeature
  • CI workflows: Updated GitHub Actions to use dotnet-version: 10.0.x across all jobs (build, deployRelease, deployTest, deployAzure)
  • Documentation: Updated README.md SDK installation reference from dotnet6 to dotnet10

Known Issues

4 integration tests in PdfAValidatorWebApiTest fail due to .NET 10 breaking change where ResponseBodyPipeWriter no longer implements PipeWriter.UnflushedBytes. This requires updating ASP.NET Core related packages in a follow-up PR.

Core library tests (29/29) pass successfully.

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


💡 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: stesee <[email protected]>
Copilot AI changed the title [WIP] Update project to target .NET 10 and adjust CI configurations Upgrade repository to .NET 10 Dec 12, 2025
Copilot AI requested a review from stesee December 12, 2025 11:15
@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