I installed WSL2 and use Visual Studio (VS) 2022 on the windows. I want to configure my VS 2022, so I can develop Python projects in WLS2. All tutorials I find online only talks about visual studio code. I don't want to install another IDE. Does anybody know how to do that or point me to some material?
CodePudding user response:
Unfortunately not at this time, no. The VSCode integration with WSL is done through the use of an extension that creates an interop server between Windows VSCode and the Linux side of WSL. There isn't an extension like that for Visual Studio, however.
The only WSL integration that I'm aware of in Visual Studio 2022 is the inclusion of a WSL toolchain that allows you to target WSL/Linux in C projects. But nothing that I'm aware of for Python, no.
I believe you'll need to install an additional IDE to get Python/WSL support, sorry.
CodePudding user response:
Not sure if VS is available for Linux or WSL2 yet.
If you look at https://visualstudio.microsoft.com/downloads/, only Windows & Mac seem to be supported.
So you have 2 main options:
- Use VS on Windows itself. Then you just need to install the Python Tools for Visual Studio (PTVS) to be able to support Python development
- Use VS Code on WSL2 - it's pretty lightweight to install anyway as a code editor, but can be endowed with comparable features to VS
EDIT: It may be that I'm misunderstanding the question as pointed out below by NotTheDr01ds, and instead you want to target WSL2 from the VS IDE, developing Python.