I use VS 2015 and .net 4.5 web project with 15 project.
I use by example a package in a couple of projects of my solution and each time I need to change the version for a specific version I need to open the package.config for each projects add allowedVersions.
I'm wondering if there is a way to configure globally only one time the allowedVersions instead of openning each file?
I am afraid you could not set
allowedversionat solution level.That because the
allowedVersionsattribute is used typically during update operations to constrain the versions in thepackages.configfile, andpackages.configfile is used for project level.The NuGet team deprecated solution level packages in NuGet 3.0. So we could not pull this attribute
allowedversionfrom thepackage.configfile and apply it to the solution level.Besides, the attribute
allowedversioncan be a range value and does not need to be a specific value. Does your project have strict restrictions on the nuget package version? Can it only be a specific version? If not, you can give a version range to the attributeallowedversionnot using a specify version, like:If you can only use a specific version in your project, I am afraid you have to openning each file to change that attribute.