Visual Studio will natively support WSL 2

Recently, Microsoft officially announced that its integrated development environment, Visual Studio, will natively support WSL 2, which means that VS users can seamlessly build and debug on WSL 2 without adding an SSH connection to improve operating efficiency.

It is reported that Microsoft natively supported WSL 1 in Visual Studio in 2019, that is, all commands are executed locally through wsl.exe, and WSL will access data from the Windows disk under the /mnt folder. However, because VS does not natively support WSL 2 at present, the execution efficiency of these commands in WSL 2 is slow. Therefore, Microsoft officially recommends that VS users use WSL only when WSL 2 can provide better performance and 100% compatible system calls. 2.

At this stage, WSL-based Visual Studio has two situations that will cause WSL 1 to be better than WSL 2. The first is that when data must be stored in the Windows file system, WSL 1 can process data in Windows faster and communicate with Linux ; The second case is that when you need to use different tools for Windows and Linux systems to cross-compile the same file, the cross-system access efficiency of WSL 1 is also faster than that of WSL 2. Therefore, users of WSL 2 usually need to install and execute SSH locally and create a new SSH connection in VS to improve the cross-system transmission efficiency of WSL 2.

Therefore, Microsoft decided to provide WSL 2 native support for Visual Studio, so that developers do not need to add SSH connections, thereby improving the efficiency of VS on WSL 2.

Reference link: https://devblogs.microsoft.com/cppblog/c-with-visual-studio-and-wsl2/

Guess you like

Origin www.oschina.net/news/127038/vs-will-native-sup-wsl2