Primo Software

Setup .NET development environment on Windows

Setup for Windows

Scripts are PowerShell.

Download the dotnet-install.ps1 script

Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile 'dotnet-install.ps1';

.NET Runtime

.NET Runtime 6.0 (LTS)

./dotnet-install.ps1 -InstallDir '~/.dotnet' -Channel 6.0 -Runtime dotnet -Version latest

or download and install from Microsoft

.NET Runtime 7.0

./dotnet-install.ps1 -InstallDir '~/.dotnet' -Channel 7.0 -Runtime dotnet -Version latest

or download and install from Microsoft

.NET Runtime 8.0 (LTS)

./dotnet-install.ps1 -InstallDir '~/.dotnet' -Channel 8.0 -Runtime dotnet -Version latest

or download and install from Microsoft

.NET SDK

.NET 4.8

mkdir ~/Downloads
cd ~/Downloads

Start-BitsTransfer `
    -Source 'https://go.microsoft.com/fwlink/?linkid=2088517'  `
    -Destination ".\ndp48-devpack-enu.exe"
& ./ndp48-devpack-enu.exe /q /norestart /log ndp48-devpack-enu.log

# For non-silent install
# & ./ndp48-devpack-enu.exe 

.NET 6.0

./dotnet-install.ps1 -InstallDir '~/.dotnet' -Channel 6.0

.NET 7.0

./dotnet-install.ps1 -InstallDir '~/.dotnet' -Channel 7.0

.NET 8.0

./dotnet-install.ps1 -InstallDir '~/.dotnet' -Channel 8.0

Test

Test that you can run the dotnet CLI (command line interface)

dotnet --version
dotnet new console --help