Skip to content

[Org Update] Update .NET to net8.0,net9.0,net10.0 - #20

Closed
Alerinos wants to merge 1 commit into
masterfrom
auto/update-dotnet-org-wide
Closed

[Org Update] Update .NET to net8.0,net9.0,net10.0#20
Alerinos wants to merge 1 commit into
masterfrom
auto/update-dotnet-org-wide

Conversation

@Alerinos

Copy link
Copy Markdown
Contributor

Organization-Wide .NET Update

This PR was created as part of an organization-wide .NET update.

Target Frameworks: net8.0,net9.0,net10.0

Tracking Issue: Zonit/.github#25


What Changed:

  • Projects Updated: 3
  • Packages Configured: 6
  • Package Versions Changed: 11
  • Common Packages: COMMON_6
  • Framework-Specific Packages: 4
  • Target Frameworks: net8.0;net9.0;net10.0
  • Central Package Management: Enabled

The following NuGet packages were updated:

Microsoft.EntityFrameworkCore.Abstractions [net10.0]: 10.0.0-preview.4.25258.110 -> 10.0.0
Microsoft.EntityFrameworkCore.Abstractions [net8.0]: 8.0.16 -> 8.0.22
Microsoft.EntityFrameworkCore.Abstractions [net9.0]: 9.0.5 -> 9.0.11
Microsoft.EntityFrameworkCore.Relational [net10.0]: 10.0.0-preview.4.25258.110 -> 10.0.0
Microsoft.EntityFrameworkCore.Relational [net8.0]: 8.0.16 -> 8.0.22
Microsoft.EntityFrameworkCore.Relational [net9.0]: 9.0.5 -> 9.0.11
Microsoft.EntityFrameworkCore.SqlServer [net10.0]: 10.0.0-preview.4.25258.110 -> 10.0.0
Microsoft.EntityFrameworkCore.SqlServer [net8.0]: 8.0.16 -> 8.0.22
Microsoft.EntityFrameworkCore.SqlServer [net9.0]: 9.0.5 -> 9.0.11
Microsoft.Extensions.Hosting [net10.0]: 10.0.0-preview.4.25258.110 -> 10.0.0
Microsoft.Extensions.Hosting [net9.0]: 9.0.5 -> 9.0.11

Next Steps:

  1. Review changes
  2. Run dotnet restore
  3. Run dotnet build
  4. Run tests
  5. Merge when ready

Part of: Organization-wide .NET update
Tracking: Zonit/.github#25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Tools/Update-DotNet.ps1
Version = $pv.Version
Attributes = $attrs
ChildElements = $childElements
Framework = if ($ig.Condition -and $ig.Condition -match "'\\`$\(TargetFramework\)' == '(net\d+\.\d+)'") { $matches[1] } else { $null }

Copilot AI Nov 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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 }

Copilot uses AI. Check for mistakes.
<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" />

Copilot AI Nov 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.22" />

Copilot uses AI. Check for mistakes.
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" />

Copilot AI Nov 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
<PackageReference Include="Microsoft.EntityFrameworkCore" />

Copilot uses AI. Check for mistakes.
Comment thread dotnet-update-report.json
"PackagesConfigured": 6,
"PackagesChanged": 11,
"ProjectsUpdated": 3,
"CommonPackages": 0

Copilot AI Nov 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread Tools/Update-DotNet.ps1
}

# ====================================================================================
# KLUCZOWA LOGIKA: Sprawdzanie duplikatów

Copilot AI Nov 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Suggested change
# KLUCZOWA LOGIKA: Sprawdzanie duplikatów
# KEY LOGIC: Checking for duplicate versions across frameworks

Copilot uses AI. Check for mistakes.
@Alerinos Alerinos closed this Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action-update Automated updates from GitHub Actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants