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
Copy file name to clipboardExpand all lines: hub/dev-drive/index.md
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,9 +141,9 @@ A package cache is the global folder location used by applications to store file
141
141
142
142
-**NuGet global-packages folder**: The NuGet global-packages folder is used by dotnet, MSBuild, and Visual Studio. Create a user specific NuGet directory in your CopyOnWrite (CoW) filesystem. For example: `D:\<username>\.nuget\packages`. Use one of the following ways to change the global-packages folder from the default location to your newly created folder (to manage the globally installed packages):
143
143
144
-
- Set a global environment variable `NUGET_PACKAGES` to that path. For example: `setx /M NUGET_PACKAGES D:\<username>\.nuget\packages`.
145
-
- Set `globalPackagesFolder`, when using `PackageReference`, or `repositoryPath`, when using `packages.config`, to that path in configuration settings.
144
+
- Set `globalPackagesFolder`, when using `PackageReference`, or `repositoryPath`, when using `packages.config`, to that path in a [NuGet configuration file](/nuget/consume-packages/configuring-nuget-behavior). This is the recommended approach because the setting is scoped to the configuration file and won't override repository-specific settings the way an environment variable would.
146
145
- Set the `RestorePackagesPath` MSBuild property (MSBuild only) to that path.
146
+
- Set a global environment variable `NUGET_PACKAGES` to that path. For example: `setx /M NUGET_PACKAGES D:\<username>\.nuget\packages`. Note: this environment variable overrides any `globalPackagesFolder` setting in NuGet configuration files, including repository-specific settings.
147
147
148
148
To verify the global-packages folder, run the dotnet nuget locals command: `dotnet nuget locals global-packages --list`. The restore will install and download packages into the new path. The default NuGet global-packages folder can be deleted. Learn more in the [NuGet docs: Managing the global packages, cache, and temp folders](/nuget/consume-packages/managing-the-global-packages-and-cache-folders).
149
149
@@ -310,7 +310,7 @@ Beginning in Windows 11 24H2 & Windows Server 2025, Block cloning is now support
310
310
There are a few scenarios in which we do not recommend using a Dev Drive. These include:
311
311
312
312
- Reformatting an existing storage volume to be a "Dev Drive" will destroy any content stored in that volume. Reformatting an existing volume while preserving the content stored there is not supported.
313
-
- When you create a Virtual Hard Disk (VHD) hosted on a fixed disk (HDD or SSD), it is not recommended to copy the VHD, move it to a different machine, and then continue using it as a Dev Drive.
313
+
- When you create a Virtual Hard Disk (VHD) hosted on a fixed disk (HDD or SSD), it is not recommended to copy the VHD, move it to a different machine, and then continue using it as a Dev Drive. The Dev Drive designation (including trust status and filter policies) is stored per-machine and does not transfer with the VHD file. If you move a VHD to a new machine, you will need to re-mount it and [re-designate it as a Dev Drive](#create-dev-drive-using-existing-virtual-hard-disk-vhd-or-vhdx) and reconfigure any custom filter policies.
314
314
- A volume stored on a removable or hot-pluggable disk (such as a USB, HDD, or SSD external drive) does not support designation as a Dev Drive.
315
315
- A volume in a VHD hosted by a removable or hot-pluggable disk does not support designation as a Dev Drive.
316
316
- The C: drive on your machine cannot be designated as a Dev Drive.
@@ -366,6 +366,9 @@ For more information, see the blog post: [Dev Drive for Performance Improvements
366
366
367
367
You can access Dev Drive project files, which run on the Windows file system, from a Linux distribution running via WSL. However, WSL runs in a VHD and for the best performance files should be stored on the Linux file system. WSL is out of the scope of Windows file system so you should not expect to see any performance improvement when accessing project files in Dev Drive from a Linux distribution running via WSL.
368
368
369
+
> [!NOTE]
370
+
> The WSL `metadata` mount option, which uses extended attributes to store Linux file permissions and ownership on Windows-hosted files, is not supported on ReFS volumes (the filesystem used by Dev Drive). If your workflow depends on preserving Linux file permissions for files stored on the Windows filesystem, store those files on an NTFS volume or within the WSL virtual disk instead.
371
+
369
372
### What method is used to format a Windows storage volume?
370
373
371
374
See [`MSFT_Volume class`](/windows-hardware/drivers/storage/format-msft-volume) in the Windows Driver docs.
Yes, the Dev Drive VHD will be included in the BitLocker encryption of the hosting volume. It is not necessary to enable BitLocker on the mounted VHD.
384
387
388
+
### How do I back up a Dev Drive?
389
+
390
+
The best backup approach depends on how your Dev Drive is set up:
391
+
392
+
-**VHD-based Dev Drive**: The VHD file (`.vhd` or `.vhdx`) can be backed up like any regular file. Copy it to an external drive, network share, or cloud storage. Note that the Dev Drive designation and filter policies are per-machine and won't transfer automatically — if you restore to a new machine, you'll need to [re-mount the VHD and re-designate it as a Dev Drive](#create-dev-drive-using-existing-virtual-hard-disk-vhd-or-vhdx).
393
+
394
+
-**Partition-based Dev Drive**: Use standard Windows backup tools such as [File History](https://support.microsoft.com/windows/back-up-your-windows-pc-87a81f8a-78fa-456e-b521-ac0560e32338) or [robocopy](/windows-server/administration/windows-commands/robocopy) to back up the contents. Cloud sync tools (OneDrive, etc.) can also back up individual files, though they may not preserve all Dev Drive-specific settings.
395
+
396
+
In both cases, the package caches stored on Dev Drive (npm, NuGet, pip, etc.) can typically be regenerated and do not need to be included in backups.
397
+
385
398
### Can Dev Drive make Java development faster on Windows?
386
399
387
400
Yes, using a Dev Drive can enhance efficiency and reduce build times when working on a Java development project. See the blog post ["Speed up your Java Development on Windows with Dev Drive"](https://devblogs.microsoft.com/java/speed-up-your-java-development-on-windows-with-microsoft-dev-drive/).
0 commit comments