-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
.NET 10 preparation #3565
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
.NET 10 preparation #3565
Conversation
- Remove usage of `IWebHost` in tests. - Style tweaks and use of newer C# features. - Update NuGet packages to their latest versions. - Assert OpenAPI documents have no warnings.
Update to September patch versions.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3565 +/- ##
=======================================
Coverage 94.28% 94.28%
=======================================
Files 110 110
Lines 3816 3816
Branches 723 723
=======================================
Hits 3598 3598
Misses 218 218
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 prepares the codebase for .NET 10 by modernizing test infrastructure and updating dependencies. The changes focus on removing deprecated IWebHost usage in favor of the newer hosting model and applying various style improvements.
- Migrated test infrastructure from
IWebHostto the genericIHostpattern - Updated NuGet packages to their latest patch versions
- Added OpenAPI warnings validation to ensure document quality
- Applied C# style improvements including target-typed new expressions and trailing commas
Reviewed Changes
Copilot reviewed 19 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/WebSites/WebApi/WebApi.csproj | Updated Microsoft.AspNetCore.OpenApi to version 9.0.9 |
| test/WebSites/WebApi/EndPoints/OpenApiEndpoints.cs | Added trailing newline for consistent formatting |
| test/WebSites/ReDoc/Startup.cs | Added root redirect endpoint to api-docs |
| test/WebSites/OAuth2Integration/OAuth2Integration.csproj | Updated authentication packages to latest versions |
| test/WebSites/MvcWithNullable/MvcWithNullable.csproj | Updated Microsoft.AspNetCore.OpenApi to version 9.0.9 |
| test/Swashbuckle.AspNetCore.IntegrationTests/VerifyTests.cs | Added outputHelper parameter to TestSiteAutofaq constructor |
| test/Swashbuckle.AspNetCore.IntegrationTests/TestSiteAutofaq.cs | Refactored to inherit from TestSite and use IHost instead of IWebHost |
| test/Swashbuckle.AspNetCore.IntegrationTests/TestSite.cs | Major refactor from IWebHost to IHost with improved configuration |
| test/Swashbuckle.AspNetCore.IntegrationTests/Swashbuckle.AspNetCore.IntegrationTests.csproj | Updated testing packages to latest versions |
| test/Swashbuckle.AspNetCore.IntegrationTests/SwaggerIntegrationTests.cs | Added warnings validation and TestSiteAutofaq constructor fix |
| test/Swashbuckle.AspNetCore.IntegrationTests/DocumentProviderTests.cs | Updated service access from Host.Services to Services |
| test/Swashbuckle.AspNetCore.IntegrationTests/CustomDocumentSerializerTests.cs | Updated service access from Host.Services to Services |
| test/Swashbuckle.AspNetCore.ApiTesting.Test/*.cs | Applied style improvements with trailing commas and target-typed new |
| test/Swashbuckle.AspNetCore.Annotations.Test/*.cs | Applied style improvements and simplified method declarations |
| src/Swashbuckle.AspNetCore.Cli/Program.cs | Added pragma warnings to suppress IWebHost deprecation warnings |
| Directory.Packages.props | Updated ASP.NET Core packages to latest patch versions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Cherry-pick changes from #3283:
IWebHostin tests.