.NET SDK

INSTALLATION

PS C:\> winget search dotnet
 Microsoft .NET SDK 3.1                      Microsoft.DotNet.SDK.3_1                   3.1.426                    Tag: dotnet winget
 Microsoft .NET SDK 5.0                      Microsoft.DotNet.SDK.5                     5.0.408                    Tag: dotnet winget
 Microsoft .NET SDK 6.0                      Microsoft.DotNet.SDK.6                     6.0.428                    Tag: dotnet winget
 Microsoft .NET SDK 7.0                      Microsoft.DotNet.SDK.7                     7.0.410                    Tag: dotnet winget
 Microsoft .NET SDK 8.0                      Microsoft.DotNet.SDK.8                     8.0.409                    Tag: dotnet winget
 Microsoft .NET SDK 9.0                      Microsoft.DotNet.SDK.9                     9.0.300                    Tag: dotnet winget
 Microsoft .NET SDK 10.0 Preview             Microsoft.DotNet.SDK.Preview               10.0.100-preview.4.25258.… Tag: dotnet winget

PS C:\> winget install Microsoft.DotNet.SDK.8
 Found Microsoft .NET SDK 9.0 [Microsoft.DotNet.SDK.9] Version 9.0.300
 This application is licensed to you by its owner.
 Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
 Downloading https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.300/dotnet-sdk-9.0.300-win-x64.exe
   ██████████████████████████████   217 MB /  217 MB
 Successfully verified installer hash
 Starting package install...
 
PS C:\> 

 * ALT: 
    BROWSER > https://dotnet.microsoft.com/en-us/download/dotnet
     https://builds.dotnet.microsoft.com/dotnet/Sdk/8.0.409/dotnet-sdk-8.0.409-win-x64.exe
    Start-Process "$env:TEMP\dotnet-sdk-8.0.409-win-x64.exe" -ArgumentList "/install", "/quiet", "/norestart" -Wait
    dotnet --version

USAGE: BUILD/PUBLISH (DEPLOYMENT)

PS C:\> git clone https://github.com/EricZimmerman/MFTECmd.git
PS C:\> cd c:\Temp\MFTECmd\
PS C:\> dotnet publish -f net9.0 -r win-x64 -p:PublishSingleFile=true --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true
PS C:\> cd c:\Temp\MFTECmd\MFTECmd\bin\Release\net9.0\win-x64\publish
PS C:\> Get-ChildItem
 Directory: T:\00.HTB\MFTECmd\MFTECmd\bin\Release\net9.0\win-x64\publish

 Mode                 LastWriteTime         Length Name
 ----                 -------------         ------ ----
 -a----         5/20/2025   9:27 AM       73505112 MFTECmd.exe
 -a----         5/20/2025   9:27 AM          33876 MFTECmd.pdb
 

Last updated