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
title: Visual Studio caches for your dev box image
2
+
title: Configure Visual Studio caches for your dev box image
3
3
titleSuffix: Microsoft Dev Box
4
4
description: Learn how to generate Visual Studio caches for your customized Dev Box image.
5
5
services: dev-box
@@ -15,7 +15,7 @@ ms.topic: how-to
15
15
> [!IMPORTANT]
16
16
> Visual Studio precaching for Microsoft Dev Box is currently in public preview. This information relates to a feature that may be substantially modified before it's released. Microsoft makes no warranties, expressed or implied, with respect to the information provided here.
17
17
18
-
With Visual Studio 17.7 Preview 3, you can try precaching of Visual Studio solutions for Microsoft Dev Box. When loading projects, Visual Studio indexes files and generates metadata to enable the full suite of [IDE](/visualstudio/get-started/visual-studio-ide) capabilities. As a result, Visual Studio can sometimes take a considerable amount of time when loading large projects for the first time. However, with Microsoft Dev Box and Visual Studio 17.7 Preview 3, you can now pregenerate this startup data and make it available to Visual Studio as part of your customized dev box image. This means that when you create a dev box from a custom image including Visual Studio caches, you can log onto a Microsoft Dev Box and start working on your project immediately.
18
+
With Visual Studio 17.7 Preview 3, you can try precaching of Visual Studio solutions for Microsoft Dev Box. When loading projects, Visual Studio indexes files and generates metadata to enable the full suite of [IDE](/visualstudio/get-started/visual-studio-ide) capabilities. As a result, Visual Studio can sometimes take a considerable amount of time when loading large projects for the first time. However, with Visual Studio precaching for Microsoft Dev Box, you can now pregenerate this startup data and make it available to Visual Studio as part of your customized dev box image. This means that when you create a dev box from a custom image including Visual Studio caches, you can log onto a Microsoft Dev Box and start working on your project immediately.
19
19
20
20
Benefits of precaching your Visual Studio solution on a dev box image include:
21
21
- You can reduce the time it takes to load your solution for the first time.
@@ -27,18 +27,18 @@ Benefits of precaching your Visual Studio solution on a dev box image include:
27
27
28
28
## Prerequisites
29
29
30
-
To leverage pre-caching of your source code and IDE customizations on Microsoft Dev Box, you'll need the following:
30
+
To leverage pre-caching of your source code and Visual Studio IDE customizations on Microsoft Dev Box, you need to meet the following requirements:
31
31
32
-
- Create a dev center and configure the Microsoft Dev Box service. If you don't have one available, follow the steps in [Create a dev center](quickstart-configure-dev-box-service.md) to configure a dev box.
33
-
-[Create a custom VM image for Dev Box](how-to-customize-devbox-azure-image-builder.md) that includes your source code and pregenerated caches.
32
+
- Create a dev center and configure the Microsoft Dev Box service. If you don't have one available, follow the steps in [Quickstart: Configure Microsoft Dev Box](quickstart-configure-dev-box-service.md) to create a dev center and configure a dev box.
33
+
-[Create a custom VM image for dev box](how-to-customize-devbox-azure-image-builder.md) that includes your source code and pregenerated caches.
34
34
35
35
This article guides you through the creation of an Azure Resource Manager template. In the following sections, you'll modify that template to include processes to [generate the Visual Studio solution cache](#enable-caches-in-dev-box-images) and further improve Visual Studio performance by [preparing the git commit graph](#enable-git-commit-graph-optimizations) for your project.
36
36
37
37
You can then use the resulting image to [create new dev boxes](quickstart-configure-dev-box-service.md#3-create-a-dev-box-definition) for your team.
38
38
39
-
## Enable caches in Dev Box images
39
+
## Enable caches in dev box images
40
40
41
-
You can generate caches for your Visual Studio solution as part of an automated pipeline that builds custom Dev Box images. To do so, you must meet the following requirements:
41
+
You can generate caches for your Visual Studio solution as part of an automated pipeline that builds custom dev box images. To do so, you must meet the following requirements:
42
42
43
43
* Within the Azure Resource Manager template, add a customized step to clone the source repository of your project into a nonuser specific location on the VM.
44
44
* With the project source located on disk you can now run the `PopulateSolutionCache` feature to generate the project caches. To do this, add the following PowerShell command to your template's customized steps:
@@ -48,19 +48,19 @@ You can generate caches for your Visual Studio solution as part of an automated
This command will open your solution, execute a build, and generate the caches forthe specified solution. The generated caches will then be includedin the [custom image](how-to-customize-devbox-azure-image-builder.md) and available to Dev Box users once [posted to a connected Azure Compute Gallery](../virtual-machines/shared-image-galleries.md). You can then [create a new dev box](quickstart-configure-dev-box-service.md#3-create-a-dev-box-definition) based off this image.
51
+
This command will open your solution, execute a build, and generate the caches forthe specified solution. The generated caches will then be includedin the [custom image](how-to-customize-devbox-azure-image-builder.md) and available to dev box users once [posted to a connected Azure Compute Gallery](../virtual-machines/shared-image-galleries.md). You can then [create a new dev box](quickstart-configure-dev-box-service.md#3-create-a-dev-box-definition) based off this image.
52
52
53
53
The `/Build` flag is optional, but without it some caches that require a build to have completed won't be available. For more information on the `build` command, see [Build command-line reference](/visualstudio/ide/reference/build-devenv-exe).
54
54
55
-
When a Dev Box user opens the solution on a dev box based off the customized image, Visual Studio will read the already generated caches and skip the cache generation altogether.
55
+
When a dev box user opens the solution on a dev box based off the customized image, Visual Studio will read the already generated caches and skip the cache generation altogether.
56
56
57
57
## Enable Git commit-graph optimizations
58
58
59
-
Beyond the [standalone commit-graph feature that was made available with Visual Studio 17.2 Preview 3](https://devblogs.microsoft.com/visualstudio/supercharge-your-git-experience-in-vs/), you can also enable [commit-graph optimizations] as part of an automated pipeline that generates custom Dev Box images. To do so, you must meet the following requirements:
59
+
Beyond the [standalone commit-graph feature that was made available with Visual Studio 17.2 Preview 3](https://devblogs.microsoft.com/visualstudio/supercharge-your-git-experience-in-vs/), you can also enable commit-graph optimizations as part of an automated pipeline that generates custom dev box images. To do so, you must meet the following requirements:
60
60
61
-
* You're using [Microsoft Dev Box](overview-what-is-microsoft-dev-box.md) as your development workstation.
61
+
* You're using a [Microsoft Dev Box](overview-what-is-microsoft-dev-box.md) as your development workstation.
62
62
* The source code foryour project is savedin a non-user specific location to be included in the image.
63
-
* You can [create a custom Dev Box image](how-to-customize-devbox-azure-image-builder.md) that includes the Git source code repository for your project.
63
+
* You can [create a custom dev box image](how-to-customize-devbox-azure-image-builder.md) that includes the Git source code repository for your project.
64
64
* You're using [Visual Studio 17.7 Preview 3 or higher](https://visualstudio.microsoft.com/vs/preview/).
65
65
66
66
To enable this optimization, execute the following `git` commands from your Git repository’s location as part of your image build process:
The generated caches will then be included in the [custom image](how-to-customize-devbox-azure-image-builder.md) and available to Dev Box users once [posted to a connected Azure Compute Gallery](../virtual-machines/shared-image-galleries.md).
76
+
The generated caches will then be included in the [custom image](how-to-customize-devbox-azure-image-builder.md) and available to dev box users once [posted to a connected Azure Compute Gallery](../virtual-machines/shared-image-galleries.md).
77
77
78
-
## Get started with Visual Studio precaching in Microsoft Dev Box
79
-
80
-
[Download and install Visual Studio 17.7 Preview 3 or later](https://visualstudio.microsoft.com/vs/preview/) to get started.
78
+
## Next steps
81
79
82
-
We’d love to hear your feedback, input, and suggestions on Visual Studio precaching in Microsoft Dev Box via the [Developer Community](https://visualstudio.microsoft.com/vs/preview/).
80
+
Get started with Visual Studio precaching in Microsoft Dev Box:
83
81
84
-
## Next steps
82
+
- [Download and install Visual Studio 17.7 Preview 3 or later](https://visualstudio.microsoft.com/vs/preview/).
85
83
86
-
- [Manage a dev box definition](how-to-manage-dev-box-definitions.md)
84
+
We’d love to hear your feedback, input, and suggestions on Visual Studio precaching in Microsoft Dev Box via the [Developer Community](https://visualstudio.microsoft.com/vs/preview/).
0 commit comments