Difference between DNVM Install and Upgrade Commands

In the last post I have explained the use of install and upgrade commands for managing the runtimes in DNVM. If you have missed that post or wants to recap it, refer it here

The install and upgrade commands are mainly used for installing the runtimes, but there are some difference between those and let's examine what are those in this post.

Let's first list all the environments in the machine using the command dnvm list and will try to install a new runtime.

Install Command

From the list we can see that we are missing the Release Candidate Update 2 based on 64-bit version for the clr framework. So let's install it using the following command.

dnvm install -arch x64 -r   clr 1.0.0-rc1-update2

When you run the command, it will download the packgage from the feed and installs it to the runtimes folder in your user profiles. Then it will add the path to the process path variable and also makes it as the active one which is indicated by the * sign in the below screenshot. 

But the one disadavantage is that the selected runtime is active only for the duration of the current session in the command prompt. Meaning it will revert to none or an earlier one if I close the window and open it again.

If you compare the screenshots for the output of dnvm list commands, you can see that before installing it, the active version was 1.0.0-rc1-update 2 targeting coreclr based on x86. But after installing it's now 1.0.0.-rc1-update2 targeting clr based on x64. But if I close and reopen the terminal window, the active one will be the former one

Upgrade Command

The upgrade command also installs the runtime, but the difference is that it downloads and installs the runtime version which is the latest one.

dnvm upgrade -arch x64 -r  clr 

It will download and install the latest 64-bit version of clr framework.

The difference is that it will add to the user path as well as process variables as active version, so that the selection will be persisted and won't revert back when we close and open the command window. It will also add an alias for the runtime.

 


No Comments

Add a Comment