I'm creating my first nuget package. I added a dependency with a version that is not the latest version. However, I don't want to update to the latest version of this dependency. Is it possible to instruct it to use the specific version?
<dependencies> <dependency id="NHibernate" version="3.2.0.3001" /> </dependencies>
When I install the package I see this:
Attempting to resolve dependency 'NHibernate (≥ 3.2.0.3001)'.
This creates the following when I install the package.
<packages> <package id="Iesi.Collections" version="3.2.0.4000" /> <package id="NHibernate" version="3.2.0.4000" /> </packages>
I'd really like to see something like this: Attempting to resolve dependency 'NHibernate (3.2.0.3001)'.
Right-click the Packages folder in the project, and select Update. This will update the NuGet package to the latest version. You can double-click the Add packages and choose the specific version.
In Visual Studio, use the Help > About Microsoft Visual Studio command and look at the version displayed next to NuGet Package Manager. Alternatively, launch the Package Manager Console (Tools > NuGet Package Manager > Package Manager Console) and enter $host to see information about NuGet including the version.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With