Simply run:

C:\vs2022_buildtools_offline\vs_buildtools.exe ^ --quiet ^ --wait ^ --norestart ^ --installPath C:\BuildTools ^ --add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools ^ --add Microsoft.VisualStudio.Workload.VCTools ^ --includeRecommended

To reproduce the exact same layout on another machine or for documentation:

| Method | Pros | Cons | |--------|------|------| | | Always latest patches | Slow, network-dependent, unreproducible | | Offline layout (this article) | Reproducible, air-gap capable, fast deployment | Requires manual updates, large initial download | | Chocolatey / winget | Easy scripting | Still requires internet per install | | Pre-built VM image with tools baked in | Extremely fast | Heavy, less flexible |

$$msbuild MyProject.csproj /p:Configuration=Release$$

Visual Studio Build Tools 2022 Offline Installer

Simply run:

C:\vs2022_buildtools_offline\vs_buildtools.exe ^ --quiet ^ --wait ^ --norestart ^ --installPath C:\BuildTools ^ --add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools ^ --add Microsoft.VisualStudio.Workload.VCTools ^ --includeRecommended visual studio build tools 2022 offline installer

To reproduce the exact same layout on another machine or for documentation: Simply run: C:\vs2022_buildtools_offline\vs_buildtools

| Method | Pros | Cons | |--------|------|------| | | Always latest patches | Slow, network-dependent, unreproducible | | Offline layout (this article) | Reproducible, air-gap capable, fast deployment | Requires manual updates, large initial download | | Chocolatey / winget | Easy scripting | Still requires internet per install | | Pre-built VM image with tools baked in | Extremely fast | Heavy, less flexible | fast deployment | Requires manual updates

$$msbuild MyProject.csproj /p:Configuration=Release$$

DMCA compliant image