How do I install .NET Core in the Azure CLI shared folder?

╄→гoц情女王★ 提交于 2020-04-30 06:29:11

问题


I need to update the .NET Core version for use with Azure Functions. The dotnet command shows that the highest version available is 2.2.402. Checking in the Azure Portal CLI, the .NET Core files are installed in usr/share/dotnet/sdk.

I can install .NET Core v3.1.0.2 on my Windows 10 PC, but I can't see how to install into the share/dotnet/sdk folder so that the global.json can reference this version of .NET Core.

After installing .NET Core on Windows 10 on the c:\ drive:

PS /home/username> dotnet new .global.json

A compatible SDK version for global.json version: [3.1.102] from [/home/username/global.json] was not found Did you mean to run dotnet SDK commands? Please install dotnet SDK from: https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

Trying the install command on the Azure Portal CLI throws the following error message:

Azure:/
PS Azure:\> ./dotnet-install.ps1 -Channel 3.1 -InstallDir ./usr/share/dotnet/sdk/

./dotnet-install.ps1: The term './dotnet-install.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

来源:https://stackoverflow.com/questions/60514333/how-do-i-install-net-core-in-the-azure-cli-shared-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!