Command line for installing / updating .NET Core

Are there any command line commands for installing or updating .NET Core?

I checked if .NET Core was installed on my computer with dotnet --version, just to notice that I still had the preview version installed on my computer. I was wondering if I can execute some commands to update it to the latest version.

+32
source share
4 answers

There is no command dotnetto update .Net Core. Instead, you should use the same approach that you used to install it first , depending on your OS.

+25

, , , Chocolatey .NET Core SDK.

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

:

> choco install dotnetcore-sdk

:

> choco upgrade dotnetcore-sdk
+8

, ( ) , .

.NET Core 1.1.0 SDK 1.0.0 Preview 2 ( ), SDK 1.0.0 Preview 3.

.NET Core 1.1.0 @svick, SDK Preview 3 : https://github.com/dotnet/core/blob/master/release-notes/preview3-download.md

0

csproj TargetFramework, , , dotnet --info.

<PropertyGroup>
    <TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

PackageReference csproj.

Use NuGet to update links to packages above. For your information, I just use the tools in VS or Rider, but after updating the package version in NuGet, here is the result.

new

<ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.App" />
    <PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
</ItemGroup>

I know this can take a long time, however I did not find any automatic way, at least for this date.

You will obviously need to transfer / fix any changes to the library your code relies on.

0
source

Source: https://habr.com/ru/post/1656534/


All Articles