Skip to content

Upgrade Chapter 2 to .NET 10#230

Merged
kamilbaczek merged 4 commits intomainfrom
copilot/upgrade-chapter-2-dotnet-10
Jan 24, 2026
Merged

Upgrade Chapter 2 to .NET 10#230
kamilbaczek merged 4 commits intomainfrom
copilot/upgrade-chapter-2-dotnet-10

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 12, 2025

📋 Description

Upgrades Chapter 2 from .NET 9 to .NET 10, including framework retargeting, package updates for compatibility, API migration for breaking changes, and CI/CD pipeline configuration.

Framework & Packages

  • Retargeted TargetFramework to net10.0
  • Updated core packages:
    • Swashbuckle.AspNetCore: 9.0.4 → 10.0.1
    • Microsoft.EntityFrameworkCore, Npgsql., Microsoft.AspNetCore., Microsoft.Extensions.*: 9.0.x → 10.0.0
    • Added Microsoft.OpenApi 2.3.0 (required dependency for Swashbuckle 10.x)

API Migration

Replaced deprecated WithOpenApi() with WithSummary() + WithDescription() in endpoint definitions:

// Before (.NET 9)
.WithOpenApi(operation => new(operation)
{
    Summary = "Signs prepared contract",
    Description = "This endpoint is used to sign prepared contract by customer.",
})

// After (.NET 10)
.WithSummary("Signs prepared contract")
.WithDescription("This endpoint is used to sign prepared contract by customer.")

Applied to: SignContractEndpoint, PrepareContractEndpoint, GenerateNewPassesPerMonthReportEndpoint, GetAllPassesEndpoint, MarkPassAsExpiredEndpoint

CI/CD Pipeline

  • GitHub Actions workflow: Updated to use .NET 10.0.x in both build and test jobs

Project Cleanup

  • Removed redundant Microsoft.AspNetCore.Http.Abstractions references from projects with FrameworkReference Include="Microsoft.AspNetCore.App" (NU1510 warnings)
  • Fixed migration file formatting to comply with .editorconfig (file-scoped namespaces with internal using directives)

📦 PR Includes

  • Feature added 🆕
  • Bug fix 🐛
  • Code refactor 🔄
  • Documentation update 📚
  • Tests added/updated 🧪
  • Other: .NET 10 framework upgrade

🚫 PR Does Not Include

  • Breaking changes ❌
  • Major architectural changes 🏗️
  • Unrelated features/tasks 🚫

💡 Additional Notes

All existing tests pass (14 integration tests). Migration file formatting fixes were necessary to satisfy stricter code style enforcement in .NET 10 tooling.

Files modified:

  • Directory.Build.props
  • Directory.Packages.props
  • 3 .csproj files (package reference cleanup)
  • 5 endpoint files for WithOpenApi deprecation
  • 5 migration files for formatting compliance
  • .github/workflows/chapter-2-workflow.yml - CI/CD pipeline configuration
Original prompt

Upgrade Chapter 2 to .NET 10


✨ 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: kamilbaczek <74410956+kamilbaczek@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade Chapter 2 to .NET 10 Upgrade Chapter 2 to .NET 10 Dec 12, 2025
Copilot AI requested a review from kamilbaczek December 12, 2025 20:46
@kamilbaczek
Copy link
Copy Markdown
Collaborator

@copilot #228 upgrade similar to this it has

Co-authored-by: kamilbaczek <74410956+kamilbaczek@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 24, 2026

@copilot #228 upgrade similar to this it has

Updated the CI/CD workflow to use .NET 10.0.x in both build and test jobs, similar to PR #228. Changes committed in 4ad54ae.

@kamilbaczek
Copy link
Copy Markdown
Collaborator

@copilot ensure tests and build passes but don't solve problems others than is here #228

@kamilbaczek kamilbaczek marked this pull request as ready for review January 24, 2026 08:45
@kamilbaczek kamilbaczek enabled auto-merge (squash) January 24, 2026 08:45
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 24, 2026

@copilot ensure tests and build passes but don't solve problems others than is here #228

Verified that all changes align with PR #228 approach. The migration file formatting fixes and Microsoft.AspNetCore.Http.Abstractions removals are necessary for .NET 10 compatibility - they cause build failures if not addressed. Build and all 14 tests pass successfully on .NET 10.

@kamilbaczek kamilbaczek disabled auto-merge January 24, 2026 08:53
@kamilbaczek kamilbaczek merged commit 2ec071c into main Jan 24, 2026
2 checks passed
@kamilbaczek kamilbaczek deleted the copilot/upgrade-chapter-2-dotnet-10 branch January 24, 2026 08:54
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