You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some manifests, for example Microsoft.VisualStudo, contain command line options that I would like to remove, for example I have no use for Python, but the manifest specifies "--add Microsoft.VisualStudio.Workload.Python"
I would like to install Visual Studio without this option; however, if I use --override it clears all options specified in the manifest and replaces them. So the only way for me to exclude the options is to copy the whole custom line from the manifest, without the options that I don't want to use.
A new switch that removes the listed arguments from the installer command-line rather than replaces them. This would supplement the --override option rather than replacing it.
Something along the lines of the following would then allow me to retain the manifest-specified default options, whilst still removing what I don't want:
You can probably just add the --remove Microsoft.VisualStudio... option. Maybe VS will be upset about adding and removing the same component, but I seem to recall it supported that approach.
@zooba, But at the moment, we can't just add options either - we can only overwrite them.
When I first created this, the VS Enterprise manifest included a few workflows. Now it includes all.
I would much rather remove the --allWorkloads --includeRecommended options and specify my workflows, than removing workflows which becomes more fragile if new workflows are added.
Description of the new feature/enhancement
This is the counterpart to #239
Some manifests, for example Microsoft.VisualStudo, contain command line options that I would like to remove, for example I have no use for Python, but the manifest specifies "--add Microsoft.VisualStudio.Workload.Python"
I would like to install Visual Studio without this option; however, if I use --override it clears all options specified in the manifest and replaces them. So the only way for me to exclude the options is to copy the whole custom line from the manifest, without the options that I don't want to use.
Proposed technical implementation details (optional)
A new switch that removes the listed arguments from the installer command-line rather than replaces them. This would supplement the --override option rather than replacing it.
Something along the lines of the following would then allow me to retain the manifest-specified default options, whilst still removing what I don't want:
winget install --remove-args "--add Microsoft.VisualStudio.Workload.Python" Microsoft.VisualStudio.Enterprise
I would be able to specify multiple --remove-args multiple times to remove several arguments, e.g.:
winget install --remove-args "--add Microsoft.VisualStudio.Workload.Python" --remove-args "--add Microsoft.VisualStudio.Workload.NativeDesktop" Microsoft.VisualStudio.Enterprise
They key benefit here is that if the authors of the manifest add new default options, I don't have to manually modify my install command to match.
The text was updated successfully, but these errors were encountered: