I've installed .NET Core SDK on Windows 10 machine using dotnet-install scripts with the powershell command
./dotnet-install.ps1 -Channel Current
SDK was installed to default location C:\Users\[USERNAME]\AppData\Local\Microsoft\dotnet and the only way I can use it from another location is
C:\Users\[USERNAME]\AppData\Local\Microsoft\dotnet\dotnet.exe
How to make it global to use just dotnet
anywhere?
When you install it via scripts use key -InstallDir
for change directory.
To use exe file from everywhere just change Environment variable (add path to exe).
For add it to your user PS profile:
Add-Content -Path $Profile.CurrentUserAllHosts -Value '$Env:Path += ";C:\Users\[USERNAME]\AppData\Local\Microsoft\dotnet\dotnet.exe"'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With