Add net462 target to ServiceDiscovery#11114
Conversation
There was a problem hiding this comment.
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 |
An add on from microsoft#10470 that added support for netstandard2.0, this adds an explicit net462 target which is part of the recommendation for multi-targetd libraries.
joperezr
left a comment
There was a problem hiding this comment.
Looks good other than reversing the condition
|
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.