Installing multiple versions of a dependency using mise
Table of Contents
Install multiple versions
I am using mise to manage dependencies, in a recent project I had dependencies on two versions of dotnet. My original mise.toml file looked like this:
[tools]
dotnet = "10.0.302"
But I also require 8.x.x which I can include by replacing the value with a list. Further, being unsure of what versions are available, and wanting to get the latest, I can include just the major number to have mise install the very latest version:
[tools]
dotnet = ["8", "10.0.302"]
Running mise install will install the latest 8.x.x., I can review what has been installed by running mise list on the command line:
mise list
# Tool Version Source Requested
# dotnet 8.0.423 (symlink) ~/Code/swift-integrator/mise.toml 8.0.423
# dotnet 10.0.302 (symlink) ~/Code/swift-integrator/mise.toml 10.0.302
From there, I can pin the version in my mise.toml file:
[tools]
dotnet = ["8.2.423", "10.0.302"]

Comments