0

I have seen that it was possible to download and install different versions of a package. However I would like to know how to push different versions of a package to a server: If I pack a package and version it to 0.1 then proceed to push it - and later on version a package to 0.2, it will actually override the previous version on the server side instead of 'adding it'. Is there a way to maintain multiple versions without deleting the previous one ?

trexgris
  • 362
  • 3
  • 14

1 Answers1

0

That's not how it works. You can force push the same package version to overwrite an already published version, but if you push a new version then both versions will exist side by side in your nuget feed.

To list multiple available versions of a package:

choco list -a package-id

And to install multiple versions of a package side-by-side:

choco install -m package-id --version 1.0

where 1.0 should be replaced with the target version of the package you want.

Use caution with side-by-side packages

Do note that there is one limitation with this approach - if the package simply wraps an EXE or MSI installer, if the installer itself does not support side-by-side installations the installed software will likely be the at the version of the last package version you installed.

codewario
  • 19,553
  • 20
  • 90
  • 159