Dutton

How to install a specific version of a package with nuget

I am having a few problems with the latest version of AvalonDock (in particular my custom PRISM RegionAdapter implementation, blog post\moan to follow one day when I get a chance) so have had to roll back to the version I developed under which worked for me.

You can't do this via the "Manage nuget packages" dialog in Visual Studio as that only lets you install\uninstall\manage the latest version of packages, so you have to fire up the "Package Manager Console" (under View -> Other Windows, if you don't already have it open) and use the command line.

The command to list available versions is:

Get-Package -ListAvailable -Filter AvalonDock -AllVersions

And then you can use the following to install a specific version (make sure you have the project you want to install into selected in the "Default project" drop-down) :

Install-Package AvalonDock -Version 2.0.1320

And lo and behold, you have 2.0.1320 of AvalonDock installed and your RegionAdapter suddenly works again!


Share this: