问题
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