whatsapp-icon

Microsoft Build Tools 2022 [better] -

| What you need | Workload ID | |---------------|-------------| | Just MSBuild | Microsoft.VisualStudio.Workload.MSBuildTools | | C++ desktop | Microsoft.VisualStudio.Workload.VCTools | | .NET desktop build | Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools | | Windows 10/11 SDK | Microsoft.VisualStudio.Component.Windows11SDK.22621 |

Always add --wait in CI scripts – otherwise the installer may detach and the pipeline will continue prematurely. Common Use Cases & Examples 1. Building a C++ project without VS After installation, MSBuild is at: microsoft build tools 2022

$msbuild = "C:\BuildTools\MSBuild\Current\Bin\MSBuild.exe" & $msbuild -version | What you need | Workload ID |

C:\BuildTools\MSBuild\Current\Bin\MSBuild.exe Build your solution: Let me know your favorite Build Tools 2022

"Build Tools = compilers + MSBuild – the kitchen sink." Did this help you? Let me know your favorite Build Tools 2022 tips in the comments.

You get a vs_BuildTools.exe (~2 MB bootstrapper). vs_BuildTools.exe --quiet --wait --norestart --installPath C:\BuildTools ` --add Microsoft.VisualStudio.Workload.MSBuildTools ` --add Microsoft.VisualStudio.Workload.VCTools ` --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ` --add Microsoft.VisualStudio.Component.Windows10SDK.20348 ` --includeRecommended Workload IDs for common scenarios:

| What you need | Workload ID | |---------------|-------------| | Just MSBuild | Microsoft.VisualStudio.Workload.MSBuildTools | | C++ desktop | Microsoft.VisualStudio.Workload.VCTools | | .NET desktop build | Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools | | Windows 10/11 SDK | Microsoft.VisualStudio.Component.Windows11SDK.22621 |

Always add --wait in CI scripts – otherwise the installer may detach and the pipeline will continue prematurely. Common Use Cases & Examples 1. Building a C++ project without VS After installation, MSBuild is at:

$msbuild = "C:\BuildTools\MSBuild\Current\Bin\MSBuild.exe" & $msbuild -version

C:\BuildTools\MSBuild\Current\Bin\MSBuild.exe Build your solution:

"Build Tools = compilers + MSBuild – the kitchen sink." Did this help you? Let me know your favorite Build Tools 2022 tips in the comments.

You get a vs_BuildTools.exe (~2 MB bootstrapper). vs_BuildTools.exe --quiet --wait --norestart --installPath C:\BuildTools ` --add Microsoft.VisualStudio.Workload.MSBuildTools ` --add Microsoft.VisualStudio.Workload.VCTools ` --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ` --add Microsoft.VisualStudio.Component.Windows10SDK.20348 ` --includeRecommended Workload IDs for common scenarios: