Update .NET to 9.0 and all dependencies to latest versions #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR updates the project from .NET 6.0 (which is out of support) to .NET 9.0 (the latest stable version) and updates all NuGet package dependencies to their latest compatible versions.
Motivation
.NET 6.0 reached end-of-support and is no longer receiving security updates. The build was generating warnings:
Additionally, several packages were multiple major versions behind their latest releases.
Changes Made
.NET Framework
global.jsonSDK version from 3.1.0 to 9.0.0TargetFrameworkproperties fromnet6.0tonet9.0Package Updates
Entity Framework Core (7.0.4 → 9.0.9)
Microsoft.EntityFrameworkCoreMicrosoft.EntityFrameworkCore.RelationalMicrosoft.EntityFrameworkCore.SqlServerMicrosoft.EntityFrameworkCore.ToolsMicrosoft.EntityFrameworkCore.InMemoryDevelopment Tools
Microsoft.VisualStudio.Web.CodeGeneration.Design: 6.0.13 → 9.0.0Testing Packages
Microsoft.NET.Test.Sdk: 17.5.0 → 17.12.0MSTest.TestAdapter: 3.0.2 → 3.7.0MSTest.TestFramework: 3.0.2 → 3.7.0Moq: 4.18.4 → 4.20.72coverlet.collector: 3.2.0 → 6.0.2Testing
✅ All 20 existing tests pass successfully:
UnitTestingDemo.Services.Tests: 4 tests passedUnitTestingDemo.Tests: 3 tests passedUnitTestingDemo.Data.Tests: 13 tests passed✅ Build completes successfully with 0 warnings and 0 errors in both Debug and Release configurations.
Impact
Files Modified
Total: 8 files changed, 30 insertions(+), 30 deletions(-)
global.jsonsrc/UnitTestingDemo/UnitTestingDemo.csprojsrc/UnitTestingDemo.Data/UnitTestingDemo.Data.csprojsrc/UnitTestingDemo.Services/UnitTestingDemo.Services.csprojsrc/UnitTestingDemo.Domain/UnitTestingDemo.Domain.csprojtests/UnitTestingDemo.Tests/UnitTestingDemo.Tests.csprojtests/UnitTestingDemo.Data.Tests/UnitTestingDemo.Data.Tests.csprojtests/UnitTestingDemo.Services.Tests/UnitTestingDemo.Services.Tests.csprojCloses #[issue_number]
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.