[Org Update] Update .NET to net8.0,net9.0,net10.0 - #20
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the .NET target frameworks to net8.0, net9.0, and net10.0, and updates NuGet package versions across the repository. The update uses Central Package Management via Directory.Packages.props to manage package versions consistently across all target frameworks.
- Updates Entity Framework Core packages to the latest stable versions (8.0.22, 9.0.11, and 10.0.0 respectively)
- Updates Microsoft.Extensions.Hosting packages for net9.0 and net10.0 frameworks
- Adds net10.0 target framework support to the Example project
- Includes a PowerShell automation script for future .NET updates
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet-update-report.json | New JSON report documenting package version changes and update summary |
| Tools/Update-DotNet.ps1 | New PowerShell automation script for managing .NET framework and package updates |
| Source/Zonit.Extensions.Databases.SqlServer/Zonit.Extensions.Databases.SqlServer.csproj | Formatting improvements (tabs to spaces) and target framework consistency |
| Source/Zonit.Extensions.Databases.Abstractions/Zonit.Extensions.Databases.Abstractions.csproj | Formatting improvements (tabs to spaces) |
| Source/Directory.Packages.props | Updated package versions for all target frameworks and reorganized package structure |
| Example/Zonit.Extensions.Databases.Examples/Zonit.Extensions.Databases.Examples.csproj | Added net10.0 target framework and formatting improvements |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Version = $pv.Version | ||
| Attributes = $attrs | ||
| ChildElements = $childElements | ||
| Framework = if ($ig.Condition -and $ig.Condition -match "'\\`$\(TargetFramework\)' == '(net\d+\.\d+)'") { $matches[1] } else { $null } |
There was a problem hiding this comment.
The regex pattern has an extra backslash escape: '\\$(TargetFramework)'. This should be '`$(TargetFramework)'(single backslash) to correctly match the condition format'$(TargetFramework)' == 'net8.0'`. The double backslash would attempt to match a literal backslash character in the condition string, which doesn't exist. This inconsistency with line 588 could cause the framework detection to fail for PrivateAssets packages.
| Framework = if ($ig.Condition -and $ig.Condition -match "'\\`$\(TargetFramework\)' == '(net\d+\.\d+)'") { $matches[1] } else { $null } | |
| Framework = if ($ig.Condition -and $ig.Condition -match "'`$\(TargetFramework\)' == '(net\d+\.\d+)'") { $matches[1] } else { $null } |
| <PackageVersion Include="Microsoft.EntityFrameworkCore.Abstractions" Version="8.0.22" /> | ||
| <PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.22" /> | ||
| <PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.22" /> | ||
| <PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.1" /> |
There was a problem hiding this comment.
The Microsoft.Extensions.Hosting package for net8.0 is at version 8.0.1, while other Microsoft packages (EntityFrameworkCore.*) were updated to 8.0.22. For consistency and to ensure all packages are using the latest patch versions, Microsoft.Extensions.Hosting for net8.0 should be updated to 8.0.22 or later.
| <PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.1" /> | |
| <PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.22" /> |
| <TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.EntityFrameworkCore" /> |
There was a problem hiding this comment.
The PackageReference for Microsoft.EntityFrameworkCore is present in the .csproj file, but there's no corresponding PackageVersion entry in Directory.Packages.props. This will cause a build error since Central Package Management is enabled. Either add the package version to Directory.Packages.props or remove the reference from the .csproj if it's not needed (it may be transitively included via Microsoft.EntityFrameworkCore.SqlServer).
| <PackageReference Include="Microsoft.EntityFrameworkCore" /> |
| "PackagesConfigured": 6, | ||
| "PackagesChanged": 11, | ||
| "ProjectsUpdated": 3, | ||
| "CommonPackages": 0 |
There was a problem hiding this comment.
The Summary.CommonPackages value shows "COMMON_6" which appears to be an unresolved placeholder. Based on the actual report data, this should be "0" since all packages are framework-specific.
| } | ||
|
|
||
| # ==================================================================================== | ||
| # KLUCZOWA LOGIKA: Sprawdzanie duplikatów |
There was a problem hiding this comment.
This comment appears to be in Polish: "KLUCZOWA LOGIKA: Sprawdzanie duplikatów" (translates to "KEY LOGIC: Checking duplicates"). For consistency and maintainability in an English codebase, this comment should be in English, such as "KEY LOGIC: Checking for duplicate versions across frameworks".
| # KLUCZOWA LOGIKA: Sprawdzanie duplikatów | |
| # KEY LOGIC: Checking for duplicate versions across frameworks |
Organization-Wide .NET Update
This PR was created as part of an organization-wide .NET update.
Target Frameworks:
net8.0,net9.0,net10.0Tracking Issue: Zonit/.github#25
What Changed:
net8.0;net9.0;net10.0The following NuGet packages were updated:
Next Steps:
dotnet restoredotnet buildPart of: Organization-wide .NET update
Tracking: Zonit/.github#25