Skip to content

Commit efdf64a

Browse files
authored
Merge pull request MicrosoftDocs#1 from heaths/nocache
Add docs to move or disable package cache
2 parents c399ef1 + 193ca0d commit efdf64a

6 files changed

+157
-68
lines changed

docs/install/TOC.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
## [Installing Visual Studio in an offline environment](install-visual-studio-in-offline-environment.md)
1313
## [Automate Visual Studio installation with a response file](automated-installation-with-response-file.md)
1414
## [Automatically apply product keys when deploying Visual Studio](automatically-apply-product-keys-when-deploying-visual-studio.md)
15-
## [Setting defaults for enterprise deployments of Visual Studio](setting-defaults-for-enterprise-deployments.md)
16-
## [Managing, enabling, and disabling the package cache](managing-the-visual-studio-package-cache.md)
15+
## [Set defaults for enterprise deployments of Visual Studio](set-defaults-for-enterprise-deployments.md)
16+
## [Disable or move the package cache](disable-or-move-the-package-cache.md)
1717
## [Update a network-based installation of Visual Studio](update-a-network-installation-of-visual-studio.md)
1818
## [Controlling updates to Visual Studio deployments](controlling-updates-to-visual-studio-deployments.md)
1919
## [Tools for detecting and managing Visual Studio instances](tools-for-managing-visual-studio-instances.md)
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: "Disable or move the package cache | Microsoft Docs"
3+
description: "Disable, enable, or move the package cache for Visual Studio deployments."
4+
ms.date: "04/14/2017"
5+
ms.reviewer: ""
6+
ms.suite: ""
7+
ms.technology:
8+
- "vs-ide-install"
9+
ms.tgt_pltfrm: ""
10+
ms.topic: "article"
11+
f1_keywords:
12+
- "cache"
13+
- "nocache"
14+
helpviewer_keywords:
15+
- "{{PLACEHOLDER}}"
16+
- "{{PLACEHOLDER}}"
17+
ms.assetid: 2429993A-3F0E-41C5-9562-FEA6AE994440
18+
author: "heaths"
19+
ms.author: "heaths"
20+
manager: "ghogen"
21+
translation.priority.ht:
22+
- "de-de"
23+
- "es-es"
24+
- "fr-fr"
25+
- "it-it"
26+
- "ja-jp"
27+
- "ko-kr"
28+
- "ru-ru"
29+
- "zh-cn"
30+
- "zh-tw"
31+
translation.priority.mt:
32+
- "cs-cz"
33+
- "pl-pl"
34+
- "pt-br"
35+
- "tr-tr"
36+
---
37+
# Disable or move the package cache
38+
39+
The package cache provides a source of installed packages in case you need to repair Visual Studio or other related products in cases
40+
where you have no Internet connection. With some drives or system set ups, however, you may not want to keep all those packages around.
41+
The installer will download them when needed, so if you want to save or recover disk space you can disable or move the package cache.
42+
43+
## Disable the package cache
44+
45+
Before you install, modify, or repair Visual Studio or other products with the new installer, you can start the installer with the
46+
`--nocache` switch to the installer.
47+
48+
```batch
49+
"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" --nocache
50+
```
51+
52+
Any operation you do on any product will remove any existing packages for that product and will avoid saving any packages after they
53+
are installed. If you modify or repair Visual Studio and packages are required, they will be downloaded automatically and removed after
54+
they are installed.
55+
56+
If you want to re-enable the cache, pass `--cache` instead. Only packages that are required will be cached, so if you need to restore
57+
all packages you should repair Visual Studio before you disconnect from your network.
58+
59+
```batch
60+
"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" repair --passive --norestart --cache
61+
```
62+
63+
You can also set the `KeepDownloadedPayloads` [registry policy](set-defaults-for-enterprise-deployments.md) to disable the cache
64+
before you install, modify, or repair Visual Studio.
65+
66+
## Move the package cache
67+
68+
A common system configuration is to have Windows installed on an SSD with a larger hard disk (or more) for development needs, such as source
69+
code, program binaries, and more. If you want to work offline you can instead move the package cache.
70+
71+
Currently, you can only do this if you set the `CachePath` [registry policy](set-defaults-for-enterprise-deployments.md) before you
72+
install, modify, or repair Visual Studio.
73+
74+
## See also
75+
76+
* [Install Visual Studio](install-visual-studio.md)
77+
* [Set defaults for enterprise deployments](set-defaults-for-enterprise-deployments.md)
78+
* [Use command-line parameters to install Visual Studio](use-command-line-parameters-to-install-visual-studio.md)
79+
* [Report a problem with Visual Studio](../ide/how-to-report-a-problem-with-visual-studio-2017.md)

docs/install/managing-the-visual-studio-package-cache.md

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: "Set defaults for enterprise deployments of Visual Studio | Microsoft Docs"
3+
description: "Domain policies and other configuration operations for enterprise deployment of Visual Studio."
4+
ms.date: "04/14/2017"
5+
ms.reviewer: ""
6+
ms.suite: ""
7+
ms.technology:
8+
- "vs-ide-install"
9+
ms.tgt_pltfrm: ""
10+
ms.topic: "article"
11+
f1_keywords:
12+
- "gpo"
13+
- "policy"
14+
helpviewer_keywords:
15+
- "{{PLACEHOLDER}}"
16+
- "{{PLACEHOLDER}}"
17+
ms.assetid: 9B7B4608-7A3F-4FF4-BDCE-42D9F7CE6DBA
18+
author: "heaths"
19+
ms.author: "heaths"
20+
manager: "ghogen"
21+
translation.priority.ht:
22+
- "de-de"
23+
- "es-es"
24+
- "fr-fr"
25+
- "it-it"
26+
- "ja-jp"
27+
- "ko-kr"
28+
- "ru-ru"
29+
- "zh-cn"
30+
- "zh-tw"
31+
translation.priority.mt:
32+
- "cs-cz"
33+
- "pl-pl"
34+
- "pt-br"
35+
- "tr-tr"
36+
---
37+
# Set defaults for enterprise deployments of Visual Studio
38+
39+
You can set registry policies that affect the deployment of Visual Studio. These policies are global for the new installer and affect:
40+
41+
- Where some packages shared with other versions or instances are installed
42+
- Where packages are cached
43+
- Whether all packages are cached
44+
45+
You can set some of these policies using [command line options](use-command-line-parameters-to-install-visual-studio.md), set registry values on your machine, or even distribute them using Group Policy across an organization.
46+
47+
## Registry keys
48+
49+
There are a number of registry keys you can set. As soon as a policy value is discovered in the order below, the remaining keys are ignored.
50+
51+
1. `HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\VisualStudio\Setup`
52+
2. `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\Setup`
53+
3. `HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\Setup` (on 64-bit operating systems)
54+
55+
Some registry values will be set automatically the first time they are used if not set already. This ensures that subsequent installs use the same values. These will be stored in the second registry key, `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\Setup`.
56+
57+
You can set the following registry values in any of those keys above.
58+
59+
| **Name** | **Type** | **Default** | **Description** |
60+
| -------- | -------- | ----------- | --------------- |
61+
| `CachePath` | `REG_SZ` or `REG_EXPAND_SZ` | %ProgramData%\Microsoft\VisualStudio\Packages | The directory where package manifests and, optionally, payloads are stored. Read how to [disable or move the package cache](disable-or-move-the-package-cache.md) for more information. |
62+
| `KeepDownloadedPayloads` | `REG_DWORD` | 1 | Keep package payloads even after they are installed. You can change the value anytime. Disabling the policy will remove any cached package payloads for the instance you repair or modify. Read how to [disable or move the package cache](disable-or-move-the-package-cache.md) for more information. |
63+
| `SharedInstallationPath` | `REG_SZ` or `REG_EXPAND_SZ` | %ProgramFiles(x86)%\Microsoft Visual Studio\Shared | The directory where some packages shared across versions of instances of Visual Studio are installed. You can change the value anytime, but that will only affect future installs. Any products already installed to the old location should not be moved or they may not function correctly. |
64+
65+
> [!IMPORTANT]
66+
> If you change the `CachePath` registry policy after any installs you must move the existing package cache to the new location and make sure it's secured so that `SYSTEM` and `Administrators` have Full Control and `Everyone` has Read access.
67+
> Failure to move the existing cache or securing it may cause problems with future installs.
68+
69+
## See also
70+
71+
* [Install Visual Studio](install-visual-studio.md)
72+
* [Disable or move the package cache](disable-or-move-the-package-cache.md)
73+
* [Use command-line parameters to install Visual Studio](use-command-line-parameters-to-install-visual-studio.md)
74+
* [Report a problem with Visual Studio](../ide/how-to-report-a-problem-with-visual-studio-2017.md)

docs/install/setting-defaults-for-enterprise-deployments.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

docs/install/use-command-line-parameters-to-install-visual-studio.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ The command-line options are used in conjunction with the setup bootstrapper, wh
9393
| ```--productId <id>``` | **Optional** The ID of the product for the instance that will be installed. This is prepopulated in normal installation conditions. |
9494
| ```--wait``` | **Optional**: The process will wait until the install is completed before returning a exit code. This is useful when automating installations where one needs to wait for the install to finish to handle the return code from that install. |
9595
| ```--locale <language-locale>``` | **Optional**: Change the display language of the user interface for the installer itself. Setting will be persisted. For more information, see the [List of language locales](#list-of-language-locales) section on this page.|
96+
| ```--cache``` | **New in 15.2, optional**: If present, packages will be kept after being installed for subsequent repairs. This will override the global policy setting to be used for subsequent installs, repairs, or modifications. The default policy is to cache packages. This is ignored for the uninstall command. Read how to [disable or move the package cache](disable-or-move-the-package-cache.md) for more information. |
97+
| ```--nocache``` | **New in 15.2, optional**: If present, packages will be be deleted after being installed or repaired. They will be downloaded again only if needed and deleted again after use. This will override the global policy setting to be used for subsequent installs, repairs, or modifications. The default policy is to cache packages. This is ignored for the uninstall command. Read how to [disable or move the package cache](disable-or-move-the-package-cache.md) for more information. |
9698

9799
## List of workload IDs and component IDs
98100
For a list of workload and component IDs sorted by Visual Studio product, see the [Visual Studio 2017 Workload and Component IDs](workload-and-component-ids.md) page.

0 commit comments

Comments
 (0)