You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
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.
Proposal
Add a ReadOnly attribute to PackageReference items that prevents tooling from changing it.
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 makes me cringe a little bit (actually a lot). Is this just optional metadata that should never really appear in my project file? Is this about hiding things from the ui?
changed the title [-]AutoReferenced PackageReference support[/-][+]AutoReferenced PackageReference support to block version changes in UI for "sdk installed" packages[/+]on Jan 26, 2017
Activity
emgarten commentedon Dec 1, 2016
This could be done by adding the
AllowedRangeproperty used in packages.config to PackageReference.Further scenarios to consider
davidfowl commentedon Dec 1, 2016
This makes me cringe a little bit (actually a lot). Is this just optional metadata that should never really appear in my project file? Is this about hiding things from the ui?
emgarten commentedon Dec 1, 2016
This would be optional metadata to hide the package from the available updates in the UI and from update all. The flag would not affect the resolver.
[-]ReadOnly PackageReference support[/-][+]AutoReferenced PackageReference support[/+][-]AutoReferenced PackageReference support[/-][+]AutoReferenced PackageReference support to block version changes in UI for "sdk installed" packages[/+]