Debug Asp net console a[pp on VS using WSL2?

NALB 61 Reputation points
2023-02-27T09:45:29.8633333+00:00

Hello ,

I have Asp net Console app which runs on windows , I have some tools the runs on WSL2 Linux subsystem from my code I have commands line that I am trying to execute using start process , the tools that I am trying to execute using the commands lines are on Linux my problem now that vs throw error that he cannot find the specified file after opening CMD in Linux i found the below

My question what should I do in order to debug my asp net app which is on windows that runs python tools commands that are on Linux WSL2?

Also is choosing to debug using WSL is same as WSL2?

'\\wsl.localhost\Ubuntu\home\'                                                                                      CMD.EXE was started with the above path as the current directory.                                                       UNC paths are not supported.  Defaulting to Windows directory.                                                          Microsoft Windows [Version 10.0.19045.2604]     


ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,400 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,888 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 61,731 Reputation points
    2023-02-28T05:25:42.8266667+00:00

    Process.start can not directly run a Linux application. It can run wsl and pass the Linux command for wsl to execute.

    You could also use a remote shell api like OpenSSL.

    0 comments No comments