As example, I am looking to have multiple versions of same package present on my machine, and switch active version without having to re-download it from chocolatey/nuget server. To take this further, ideally, I'd also want to have sets of package versions (e.g. defined in several chocolatey .config files as per https://github.com/chocolatey/choco/wiki/CommandsInstall#packagesconfig), and switch between those configs with minimal overhead, although if package is missing locally, of course it would need to be downloaded). Does chocolatey allow for this kind of mechanism, and if not - what is the closest that I can get to it? Is this better managed with switching default package source, and have each source have an appropriate version as latest?
Asked
Active
Viewed 1.4k times
1 Answers
16
Have a look at the documentation for the install command here:
https://chocolatey.org/docs/commands-install
Specifically, here:
-m, --sxs, --sidebyside, --side-by-side, --allowmultiple, --allow-multiple, --allowmultipleversions, --allow-multiple-versions
AllowMultipleVersions - Should multiple versions of a package be installed? Defaults to false.
So yes, it is possible to have multiple versions of the same package installed, however, it depends on "what" exactly is happening in the package, and the underlying installer, if this will actually result in two installations that will work independently of each other.
Gary Ewan Park
- 1,960