Sunday, October 31, 2021

[SOLVED] wslpath : The term 'wslpath' is not recognized as the name of a cmdlet" in the command vscode

Issue

I am getting the error "wslpath : The term 'wslpath' is not recognized as the name of a cmdlet" in the command" when I execute the preceding task in task.json in vscode.

Executing task: cmd /c "dotnet publish -r linux-arm -o bin\linux-arm\publish "C:\Users\SibeeshVenu\SourceCode\raspberrypi.net.core\raspberrypi.net.core.csproj"" | bash -c "rsync -rvuz $(wslpath 'C:\Users\SibeeshVenu\SourceCode\raspberrypi.net.core')/bin/linux-arm/publish/ [email protected]:~/raspberrypi.net.core"

I am not sure what exactly the problem is. The idea is to deploy my .net core application to my Raspberry Pi. I run WSL1 in my Windows.


Solution

The problem was because of the default terminal in VSCode. So I had to change that to Command Prompt. To do that, just press F1 in VSCode and type “Terminal: Select Default Shell”, and then select Command Prompt.

enter image description here

enter image description here

Hope this helps.



Answered By - Sibeesh Venu