Dev Drive for Performance Improvements in Visual Studio and Dev Boxes!
Performance has always been one of our key investment areas for developer tooling in Microsoft. We understand that it’s important for developers to have a fast workflow. That’s why we’re excited to share with you the support of Dev Drives in Visual Studio! Dev Drive for Visual Studio has just been released to help you optimize your workflow and increase your productivity. With Dev Drive, you can create a separate volume on your PC that will improve performance for disk-bound operations such as cloning, building, copying files, and package restore. We measured average improvements in these operations around of 25%! Take a look at the documentation here.
A Dev Drive volume uses ReFS instead of NTFS and is optimized specifically for developer workflows. We also recommend turning Windows Defender to “Async” for most scenarios for optimal perf gains.
Dev Drive is currently available for people who are using the Dev Channel for Windows Insiders. To get started with Dev Drive, create a volume using this documentation and clone or move your source folders to it. Depending on your toolchain, see this section for additional configuration recommendations. For example, we recommend moving the NuGet global-packages folder to this volume for optimal perf gains.
One optimization that Dev Drive provides through the ReFS filesystem is Copy-on-Write (CoW) linking, or block cloning. Instead of fully copying a file, CoW creates a metadata reference to the original data on-disk, so that disk space can be saved and less actual data is copied. You can use this capability to speed up your build by configuring your solutions to use the CopyOnWrite extension for MSBuild. Take a look at this blog post for additional details.
In the future, Dev Boxes will come pre-configured to use Dev Drives so that teams who develop in the cloud will realize these perf gains automatically. Dev Boxes are an Azure service that gives developers access to ready-to-code, project-specific developer environments. Learn more about Microsoft Dev Box here.
If you already have a Dev Drive created on your Windows machine, Visual Studio 17.7 will recognize it when you’re creating a new project and pick that filepath by default. So, not only will Dev Drive make your development tasks faster, but it will also streamline your workflow by integrating with Visual Studio.
Conclusion
Dev Drive is a new feature in Windows that helps you code more and wait less. Give it a try today and see the difference for yourself! Let us know what you think by sharing your feedback in a Developer Community feedback ticket or the Windows feedback hub.
11 comments
How to set [Live Unit Testing](https://learn.microsoft.com/en-us/visualstudio/test/live-unit-testing-intro?view=vs-2022) workspace root to a dev drive? It fails with
Failed to start file system virtualization provider (-2147024418). Check to make sure that the ‘Windows Projected File System’ optional Windows feature is turned on and close any open files or folders under ”. If you contiinue to run into this error, try closing Visual Studio and delete the ” folder, then restart Live Unit Testing. If that does not work, try restarting Windows.
Why is not recommended to install VS on this drive? Is there any app that would work better if installed on this drive?
Any improvements and how to for wsl users?
+1 Does this work for repos cloned in WSL?
That’s a great question! They are separate filesystems, so there will not be significant benefits. With WSL, perf will be best when staying within the Linux filesystem.
1. “We also recommend turning Windows Defender to “Async” for most scenarios for optimal perf gains.”
Any source where to find info what this means and how to change this setting?
2. How to utilize DevDrive with older Visual Studio 17.6? Are there any other steps than just move source code to DevDrive and use them from there?
Hi there, this documentation discusses behavior with Microsoft Defender. You are correct that moving source code to Dev Drive would give perf gains on an older Visual Studio as well, depending on the language you are using.
Awesome!
Can’t wait for the official release.
Hi Grace,
Questions:
1 – Does this work with NVM SSDs?
2 – I do not see anything in the documentation regarding OneDrive – I presume OneDrive doesn’t work with dev drives, correct?
Hi Stevie,
Thanks for your questions! Dev Drive works with any SSDs, so yes it will work for NVMe. To use OneDrive, you just need to ensure you have CloudFlt enabled on your Dev Drive. For more info on filters, please see aka.ms/devdrive.
Hope this helps!
Olivia
Thank you for the answers, Olivia!