Visual Studio脱机安装删除旧版本 [英] Visual Studio offline installation remove old versions

查看:151
本文介绍了Visual Studio脱机安装删除旧版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从Visual Studio 2017脱机安装的布局文件夹中删除旧版本的安装程序包?此文件夹在我的HDD上需要大量内存.

Is there a possibility to remove the old versions of installation packages from the layout folder of Visual Studio 2017 offline installation? This folder needs a lot of memory on my HDD.

推荐答案

您可以使用新的--clean选项.您将需要文件路径来对包含那些过时软件包的清单进行分类.您可以在脱机版式缓存中的Archive文件夹中找到目录清单.

You can use the new --clean option. You'll need the file path(s) to catalog manifest(s) that contain those obsolete packages. You can find the catalog manifests in an Archive folder in the offline layout cache.

当您更新布局时,它们会保存在此处.在存档"文件夹中,有一个或多个GUID命名文件夹,每个文件夹都包含一个过时的目录清单. GUID文件夹的数量应与对脱机缓存的更新数量相同.

They are saved there when you update a layout. In the "Archive" folder, there is one or more GUID named folders, each of which contains an obsolete catalog manifest. The number of GUID folders should be the same as the number of updates made to your offline cache.

每个GUID文件夹中都保存了一些文件.最受关注的两个文件是catalog.json文件和version.txt文件. catalog.json文件是过时的目录清单,您需要将其传递给--clean选项. version.txt文件包含此过时的目录清单的版本.根据版本号,您可以决定是否要从此目录清单中删除过时的软件包.您可以执行与其他GUID文件夹相同的操作.在确定要清除的目录之后,请提供这些目录的文件路径,以运行--clean命令.

A few files are saved inside each GUID folder. The two files of most interest are a catalog.json file and a version.txt file. The catalog.json file is the obsolete catalog manifest you'll need to pass to the --clean option. The version.txt file contains the version of this obsolete catalog manifest. Based on the version number, you can decide whether you want to remove obsolete packages from this catalog manifest. You can do the same as you go through the other GUID folders. After you make the decision on the catalog(s) you want to clean, run the --clean command by supplying the files paths to these catalogs.

示例:

vs_enterprise.exe --layout <layoutDir> --clean <file-path-of-catalog1> <file-path-of-catalog2> … 

vs_enterprise.exe --layout <layoutDir> --clean <file-path-of-catalog1> --clean <file-path-of-catalog2> … 

您还可以在<layoutDir>.中调用vs_enterprise.exe,这是一个示例:

You can also invoke vs_enterprise.exe inside the <layoutDir>. Here's an example:

c:\VS2017Layout\vs_enterprise.exe --layout c:\VS2017Layout --clean c:\VS2017Layout\Archive\1cd70189-fc55-4583-8ad8-a2711e928325\Catalog.json --clean c:\VS2017Layout\Archive\d420889f-6aad-4ba4-99e4-ed7833795a10\Catalog.json 

当您执行此命令时,安装程​​序将分析您的脱机缓存文件夹,以查找将要删除的文件列表.然后,您将有机会查看将要删除的文件并确认删除.

When you execute this command, Setup analyzes your offline cache folder to find the list of files that it will remove. You will then have a chance to review the files that are going to be deleted and confirm the deletions.

这篇关于Visual Studio脱机安装删除旧版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆