-
Notifications
You must be signed in to change notification settings - Fork 498
Add multi-targeting example to CPM doc and improve wording #3440
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
base: main
Are you sure you want to change the base?
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 a multi-targeting example to the Central Package Management documentation and refines the overall wording for improved clarity and consistency.
- Adds an example demonstrating how to specify different package versions for multiple target frameworks using MSBuild conditions.
- Updates headings, notes, and example code blocks to enhance readability and accuracy.
Comments suppressed due to low confidence (1)
docs/consume-packages/Central-Package-Management.md:102
- [nitpick] Consider adding a brief inline comment or note in the code block to clarify that the logical OR condition applies the same version for both 'net8.0' and 'net472', which may help readers who are less familiar with MSBuild conditions.
<PackageVersion Include="PackageA" Version="2.0.0" Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net472'" />
Learn Build status updates of commit 6f32e07: ✅ Validation status: passed
For more details, please refer to the build report. |
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.
Great changes.
Some suggestions, but only 1 thing I actually feel like needs fixed (transitive pinning header)
|
||
## Central Package Management rules | ||
### Using Different Versions for Different Target Frameworks |
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.
I wonder if the order of this section and the rules one should be switched.
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="PackageA" Version="1.0.0" Condition="'$(TargetFramework)' == 'netstandard2.0'" /> |
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.
Do you think it's worth calling out that PM UI and just general add package supported is limited in these multi targeted scenarios?
|
||
## Transitive pinning | ||
## Pinning Transitive Packages to Different 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.
This is a little confusing for me now.
I liked the previous title much better.
Transitive Pinning is not about different versions in any way, so I feel like that should be taken out of the title.
It's also a bit of a keyword as well.
Users have asked for examples of how to reference different versions of packages for different target frameworks so this adds one.
I also took the time to clean up some of the wording and I asked Copilot to suggest improvements. You can look at just the first commit for the introduction of the multi-targeting example and the second commit is the cleanup