When trying to run vs_enterprise.exe --layout "path\to\layout" --clean "path\to\layout\Archive\f7b494e1-bbf4-4630-91de-28d0087b60bc\Catalog.json" on the old layout I had created for 15.7, it just told me the following:
Visual Studio Setup Command Line Utility, version 1.17.1222.28281
Copyright (C) Microsoft Corporation. All rights reserved.
Catalog load operation correlation: {"id":"e4fb7c87-fe11-47dc-99de-e60baa11d041"}
CleanLayout operation correlation: {"id":"a90d1905-5e81-4856-9ef2-11525c20be9c"}
Error: The package 'Microsoft.Net.Component.4.7.2.SDK' is not recognized.
Error: Failed to parse installer manifest 'path\to\layout\Archive\f7b494e1-bbf4-4630-91de-28d0087b60bc\Catalog.json'.
Error: Failed to plan for CleanLayout.
Error: Setup completed with errors.
Error: The package 'Microsoft.Net.Component.4.7.2.SDK' is not recognized.
Press any key to continue...
As workaround, I tried to run vs_enterprise.exe --layout "path\to\layout" --remove Microsoft.Net.Component.4.7.2.SDK to get it out, try the --clean again and add it back afterwards, but that one just told me
Visual Studio Setup Command Line Utility, version 1.17.1222.28281
Copyright (C) Microsoft Corporation. All rights reserved.
Error: Invalid parameter "--remove".
Press any key to continue...
While the first feels like a temporary thing, the second one looks like it seems to be a disconnect between the provided functionality and the documentation.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
same issue with --clean starting from 15.8.3
@BhaaLseN @SuliemanMansouri Thanks for your feedback; we'll take a look. @tedvz FYI.
@BhaaLseN The Microsoft.Net.Component.4.7.2.SDK was added in 15.8 and did not exist in 15.7. Did you add the component when you updated the layout?
That was on a layout _initially_ created with 15.7 _and then_ updated to 15.8. After the update I ran --add Microsoft.Net.Component.4.7.2.SDK (amongst others) to get the new packages in; and then I wanted to remove obsolete/replaced packages by running --clean - which got me that error instead. This was _while_ using the most recent vs_setup.exe available for download at that point.
However, as 15.9 came out, I updated the layout again and ran --clean afterwards without issues; so I guess it was fixed in the meantime...
I'm not too sure about the --remove parameter though; I haven't tried it since (mostly because we usually need all the packages and add newer ones; but rarely ever remove them for now)
@BhaaLseN Thank you for the response! It seems when the package was added with --add the selection was recorded. That record was then used in the --clean operation, explaining why it failed. Since the component existed in both 15.8 and 15.9, --clean of 15.8 worked without issue. I've added this to our backlog for tracking.
The documentation may not be clear on this, but --remove is an install option, not a layout option. You'll see on Use command-line parameters to install Visual Studio 2017 that --remove is in the first section of options labeled "Install option" and is not under the "Layout option" section.
@TerryGLee We should track this as a doc defect for the Use command-line parameters to install Visual Studio 2017 page. The line between "Install options" and "Layout options" is unclear. We should provide larger headings to more easily separate the concepts.
@tydunkel Acknowledged
Good to know, thanks!
Does this mean there is no option to _remove_ something from a layout (ie. to save space, or in the current case; to remove a package/component that wasn't wanted/needed)?
What would be the intended way of doing this (mostly for documentation purposes I suppose; since I'm assuming our future layout updates will be fine and we don't need to remove anything)?
@BhaaLseN at this point, there is no support for removing an unneeded package from a layout after it is created. The only method for this would be to delete the old layout and create a new one. We will add this as a suggestion to our backlog for a future improvement to our layout support.
@tydunkel Thanks for your documentation update request; it's processed and will go live on 1/23/2019.