How to specify specific dependency version in nuspec?

Solution 1:

You should be able to force an exact version with brackets:

<dependency id="NHibernate" version="[3.2.0.3001]" />

Full info on the formats you can use are on the NuGet site, here:

http://docs.nuget.org/docs/reference/version-range-specification

Solution 2:

From the NuGet docs site, the complete notations:

enter image description here

Solution 3:

From the user side, you can also constrain the upgrade by specifying allowedVersions in the packages.config. http://docs.nuget.org/docs/reference/versioning#Constraining_Upgrades_To_Allowed_Versions