-
Notifications
You must be signed in to change notification settings - Fork 715
Add net462 target to ServiceDiscovery #11114
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
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 adds explicit .NET Framework 4.6.2 (net462) targeting to the ServiceDiscovery libraries, complementing the existing netstandard2.0 and modern .NET targets. This follows Microsoft's recommendations for multi-targeted libraries to provide better compatibility with .NET Framework applications.
- Adds
net462to theTargetFrameworksproperty in both projects - Updates AOT compatibility conditions to exclude
net462instead of justnetstandard2.0 - Extends conditional package references and imports to include
net462alongsidenetstandard2.0
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Microsoft.Extensions.ServiceDiscovery.csproj | Adds net462 target and updates conditions for AOT compatibility, package references, and polyfill imports |
| Microsoft.Extensions.ServiceDiscovery.Abstractions.csproj | Adds net462 target and updates conditions for AOT compatibility, package references, and polyfill imports |
src/Microsoft.Extensions.ServiceDiscovery/Microsoft.Extensions.ServiceDiscovery.csproj
Outdated
Show resolved
Hide resolved
...ions.ServiceDiscovery.Abstractions/Microsoft.Extensions.ServiceDiscovery.Abstractions.csproj
Outdated
Show resolved
Hide resolved
An add on from dotnet#10470 that added support for netstandard2.0, this adds an explicit net462 target which is part of the recommendation for multi-targetd libraries.
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.
Looks good other than reversing the condition
...ions.ServiceDiscovery.Abstractions/Microsoft.Extensions.ServiceDiscovery.Abstractions.csproj
Outdated
Show resolved
Hide resolved
src/Microsoft.Extensions.ServiceDiscovery/Microsoft.Extensions.ServiceDiscovery.csproj
Outdated
Show resolved
Hide resolved
|
Reason why: https://learn.microsoft.com/en-us/dotnet/standard/library-guidance/cross-platform-targeting
4.6.2 is supported until 2027. |
An add on from #10470 that added support for netstandard2.0, this adds an explicit net462 target which is part of the recommendation for multi-targeted libraries.
An add on from #10470 that added support for netstandard2.0, this adds
an explicit net462 target which is part of the recommendation for
multi-targetd libraries.