Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
AutoReferenced PackageReference support to block version changes in UI for "sdk installed" packages #4044
PackageReferences can be added to projects by external targets, these may need special steps to update beyond just changing the PackageReference. To prevent the NuGet UI and command line tools from naively changing these there should be an additional attribute that allows locking down a reference to make it read only.
<PackageReference include="NuGet.Versioning"> <Version>3.5.0</Version> <ReadOnly>true</ReadOnly> </PackageReference>
An SDK is referenced by a project and contains PackageReferences to bring down components used by the SDK. These packages must match the SDK version. The correct way to update the packages is to update to a newer version of the SDK.
Here the NuGet UI would show the packages as having updates, however if the user updates these packages through NuGet they will be broken.
This could be done by adding the
Further scenarios to consider