-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Drop netstandard support #3422
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
Drop netstandard support #3422
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #3422 +/- ##
==========================================
+ Coverage 93.55% 94.28% +0.73%
==========================================
Files 110 109 -1
Lines 3833 3728 -105
Branches 715 707 -8
==========================================
- Hits 3586 3515 -71
+ Misses 247 213 -34
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:
|
- Drop support for `netstandard2.0`. - Bump version to `9.0.0`. - Update all NuGet packages to their latest versions where possible. - Remove redundant NuGet package references. - Simplify code. Resolves #3396.
Remove public members annotated with `[Obsolete]`.
Remove deprecated `--serializeasv2` option.
e07d6ab
to
0a09ddd
Compare
Define the supported target frameworks in `Directory.Build.props` instead of in each project file.
Update NuGet packages to their latest versions.
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 drops netstandard2.0
support, bumps the major version to 9.0.0, updates and cleans up NuGet package references, and removes obsolete code and conditional compilation blocks.
- Remove
netstandard2.0
targets and related#if
branches across all projects. - Switch project files to use
$(DefaultTargetFrameworks)
and bumpVersionPrefix
to9.0.0
. - Update package versions in
Directory.Packages.props
and remove redundant package references. - Simplify code by removing deprecated options and obsolete attributes.
Reviewed Changes
Copilot reviewed 109 out of 109 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/Swashbuckle.AspNetCore.ReDoc/ReDocMiddleware.cs | Removed netstandard conditional code and streamlined middleware serialization and redirects. |
src/Swashbuckle.AspNetCore.Newtonsoft/Swashbuckle.AspNetCore.Newtonsoft.csproj | Switched to $(DefaultTargetFrameworks) , removed netstandard2.0 target and redundant refs. |
src/Swashbuckle.AspNetCore.Newtonsoft/SchemaGenerator/NewtonsoftDataContractResolver.cs | Simplified enum serialization checks; removed #if blocks around StartsWith char/string. |
src/Swashbuckle.AspNetCore.Newtonsoft/DependencyInjection/NewtonsoftServiceCollectionExtensions.cs | Removed obsolete alias import for MvcJsonOptions . |
src/Swashbuckle.AspNetCore.Cli/Swashbuckle.AspNetCore.Cli.csproj | Switched to $(DefaultTargetFrameworks) , removed netstandard2.0 target. |
src/Swashbuckle.AspNetCore.Cli/Program.cs | Dropped deprecated --serializeasv2 flag and related code. |
src/Swashbuckle.AspNetCore.ApiTesting/Swashbuckle.AspNetCore.ApiTesting.csproj | Switched to $(DefaultTargetFrameworks) , removed netstandard2.0 target. |
src/Swashbuckle.AspNetCore.ApiTesting/ApiTestRunnerBase.cs | Removed conditional compilation around status‐code check. |
src/Swashbuckle.AspNetCore.ApiTesting.Xunit/Swashbuckle.AspNetCore.ApiTesting.Xunit.csproj | Switched to $(DefaultTargetFrameworks) , removed netstandard2.0 target. |
src/Swashbuckle.AspNetCore.Annotations/Swashbuckle.AspNetCore.Annotations.csproj | Switched to $(DefaultTargetFrameworks) , removed netstandard2.0 target. |
src/Swashbuckle.AspNetCore.Annotations/SwaggerSubTypesAttribute.cs | Removed obsolete SwaggerSubTypesAttribute class. |
src/Swashbuckle.AspNetCore.Annotations/PublicAPI/netstandard2.0/PublicAPI.Shipped.txt | Removed obsolete public‐API entries for SwaggerSubTypesAttribute . |
src/Swashbuckle.AspNetCore.Annotations/PublicAPI/PublicAPI.Shipped.txt | Removed obsolete public‐API entries for SwaggerSubTypesAttribute . |
src/Swashbuckle.AspNetCore.Annotations/AnnotationsSwaggerGenOptionsExtensions.cs | Removed legacy subtype selector code and #if blocks, inlined new C#12 collection expression. |
src/Swashbuckle.AspNetCore.Annotations/AnnotationsOperationFilter.cs | Removed conditional compilation around endpoint metadata retrieval. |
Directory.Packages.props | Bumped multiple package versions and removed deprecated references. |
Directory.Build.props | Added <DefaultTargetFrameworks> and updated <VersionPrefix> to 9.0.0 . |
Comments suppressed due to low confidence (2)
src/Swashbuckle.AspNetCore.Newtonsoft/SchemaGenerator/NewtonsoftDataContractResolver.cs:45
- [nitpick] JsonConverterFunc is invoked multiple times per enum value. Consider computing the JSON representation once (e.g., using a local list) and reusing it for both the initial
StartsWith
check and the fullenumValuesAsJson
processing.
var serializeAsString = (enumValues.Length > 0) && JsonConverterFunc(enumValues.GetValue(0)).StartsWith('"');
src/Swashbuckle.AspNetCore.Annotations/AnnotationsSwaggerGenOptionsExtensions.cs:74
- [nitpick] The C#12 collection expression
[]
may be unfamiliar to some readers. For clarity and wider compatibility, consider usingArray.Empty<Type>()
to explicitly return an empty array.
return [];
netstandard2.0
.9.0.0
.[Obsolete]
.--serializeasv2
option.Resolves #3396.
Will leave this in draft until at least the week of the 2nd June in case there are any issues that come in in the next week from the 8.1.x release that need quick patching (like #3424).