Repository navigation
Conversation
Added guidance for selecting .NET library dependency versions, including strategies, tradeoffs, and recommendations for library authors.
There was a problem hiding this comment.
Pull Request Overview
This PR introduces comprehensive guidance for .NET library authors on selecting dependency versions when targeting multiple .NET framework versions. The document outlines three primary strategies (latest supported versions, TFM-specific versions, and branching), their tradeoffs, and provides concrete recommendations with code examples.
Key changes:
- New guidance document explaining dependency version selection strategies for .NET libraries.
- Decision matrix comparing engineering, servicing, and update friction costs across strategies.
- Code examples demonstrating each approach using System.Text.Json references.
Show contrast to framework overlapping package and not.
Co-authored-by: Stephen Toub <stoub@microsoft.com>
|
I've addressed all feedback, please have another pass at this. Thank you. |
|
@ericstj Do you want to address the remaining comments, or should I close this? |
|
Let me have a look, I'm working in a different space these days, but this doc needs to exist. Let me get it in. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 564e1515-0383-4989-8ea6-7271524e9539
|
@BillWagner I addressed feedback, PTAL |
There was a problem hiding this comment.
🟡 Changes recommended
The example selects vulnerable System.Text.Json 8.0.0, which runtime servicing will not replace on net6.0/net7.0, and the support-lifetime guidance could lead to incorrect servicing plans.
2 open issues
Review effort: Balanced
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" /> | ||
| <PackageReference Include="System.Text.Json" Version="8.0.0" /> |
|
|
||
| > [!NOTE] | ||
| > | ||
| > - The lifetime of the latest Standard Term Support (STS) release aligns with the latest Long Term Support (LTS) release, so choosing "latest" effectively means choosing the latest supported version regardless of STS or LTS designation. For current support dates, see the [.NET support policy](https://dotnet.microsoft.com/platform/support/policy/dotnet-core). |
|
@ericstj thanks for finishing the doc. Very much appreciated 👍 |


This is first draft. I might be assuming too much familiarity with the problem space. Please provide feedback 🤝
Internal previews
Build report