This question is related to How to install VS Build Tools 2022 with some custom install choices using chocolatey non interactively?
How can I instruct the VS installer NOT to install the .NET 4.8 targeting pack ?
CodePudding user response:
Just like how the --add
parameter can add Workloads or specific Component IDs, the --remove
can do the opposite.
vs_buildtools.exe --add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools --remove Microsoft.Net.Component.4.8.TargetingPack
You cannot remove required dependencies. Only recommended and optional (if you included the ;includeRecommeded
or ;includeOptional
with the workload ID).
You can read all about the vs_installer CLI here.
An overview of the workloads here. Or specifically the Build Tools workloads.