Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command line to install/upgrade .NET Core

Are there command line commands to install or upgrade .NET Core?

I checked to see if I had .NET Core was installed on my computer using dotnet --version only to notice that I still had the preview version installed on my computer. I was wondering if I could issue some commands to upgrade it to the latest version.

like image 294
Sam Avatar asked Oct 02 '16 22:10

Sam


People also ask

How do I upgrade my .NET Core?

The only way to update . NET Core is by downloading and installing the installer. The installation process takes a few minutes to complete. After the installation proccess is completed, I can check the installed version and see that it was updated to the latest version.


2 Answers

There is no dotnet command to update .Net Core. Instead, you should use the same approach you used to install it in the first place, which depends on your OS.

like image 111
svick Avatar answered Sep 20 '22 21:09

svick


Not promoted officially but it looks like there are approved packages on Chocolatey for .NET Core SDK.

https://chocolatey.org/packages/dotnetcore-sdk

Example:

> choco install dotnetcore-sdk

Or:

> choco upgrade dotnetcore-sdk

Update (December 2020): For .NET 5 the chocolatey package has changed since it's not technically branded as .NET Core any longer.

https://chocolatey.org/packages/dotnet-sdk/

Example:

> choco install dotnet-sdk

Or:

> choco upgrade dotnet-sdk
like image 34
jpierson Avatar answered Sep 17 '22 21:09

jpierson