-
Notifications
You must be signed in to change notification settings - Fork 240
Update dependencies and clean up some warnings for net11.0 support #2137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
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 dependencies and resolves build warnings to add support for .NET 11.0 in the Benchmarks project. The changes modernize the hosting infrastructure by migrating from the deprecated WebHostBuilder to HostBuilder with ConfigureWebHost, and update package references to support .NET 10.0 and 11.0.
Key Changes:
- Refactored
Program.csto useHostBuilder.ConfigureWebHost()instead of deprecatedWebHostBuilderdirectly - Added
UseColumnAttributeto Dapper-mapped properties to resolve DAP043 warnings - Updated dependency versions for .NET 9.0, 10.0, and 11.0 packages
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Benchmarks/Program.cs | Migrated from deprecated WebHostBuilder to HostBuilder with ConfigureWebHost wrapper to support .NET 11.0 |
| src/Benchmarks/Data/World.cs | Added UseColumnAttribute to properties with Column attribute to fix Dapper DAP043 warnings |
| src/Benchmarks/Benchmarks.csproj | Added new ItemGroup condition for net10.0/net11.0 target frameworks with updated package versions |
| build/dependencies.props | Updated package versions for .NET 9.0, added version 10.0/11.0 dependencies, removed unused Pomelo MySQL packages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <ItemGroup Condition="'$(TargetFramework)' == 'net10.0' or '$(TargetFramework)' == 'net11.0'"> | ||
| <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="$(NpgsqlEntityFrameworkCorePostgreSQLVersion100)" /> | ||
| <PackageReference Include="Npgsql" Version="$(NpgsqlVersion100)" /> | ||
| <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="$(MicrosoftEntityFrameworkCoreSqlServerVersion100)" /> | ||
| <PackageReference Include="Microsoft.Data.SqlClient" Version="$(MicrosoftDataSqlClientVersion100)" /> | ||
| <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="$(MicrosoftEntityFrameworkCoreSqliteVersion100)" /> | ||
| <PackageReference Include="Microsoft.AspNetCore.Server.IntegrationTesting.IIS" Version="$(MicrosoftIISTestingVersion100)" /> | ||
| </ItemGroup> |
Copilot
AI
Dec 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition groups net10.0 and net11.0 together, but net11.0 should use MicrosoftIISTestingVersion110 instead of MicrosoftIISTestingVersion100. Consider splitting this into two separate ItemGroup conditions: one for net10.0 using Version100 variables, and another for net11.0 using Version110 for Microsoft.AspNetCore.Server.IntegrationTesting.IIS (while other packages can continue using Version100 if no Version110 equivalents are defined).
…eption: Unable to resolve service for type 'Benchmarks.Configuration.Scenarios' while attempting to activate 'Benchmarks.Startup'.
|
Looks good, please try to run a Benchmark though that triggers the Benchmarks.csproj app (Json middleware a.k.a |
|
Cool, I will run those tests now that I have a version of the app that is building and running locally (took a few iterations to get past the With this in mind, if anyone has ideas for other or preferred approaches they would be greatly appreciated. I can also not make those changes in this PR and can make another PR to deal with the deprecation warnings. |
Update dependencies and clean up leftover warnings when building Benchmarks.csproj. This adds support for net11.0 when building the Benchmarks.csproj project with a clean build. This should also fix failing tech-empower testing in the optimization repo (or at least get us further along in the test).
The decently sized Program.cs change is really just taking the previous code and putting it inside of the ConfigureWebHost function.
When building net11, the warnings that were cleaned up were:
I tested building this with the latest net11 alpha locally and it built successfully. What other testing should be done before merging this?