wslpath:术语 'wslpath' 在命令 vscode 中未被识别为 cmdlet 的名称”

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

当我在 task.json 在 [=13] 中执行前面的任务时,我收到错误消息“wslpath:术语 'wslpath' 在命令中未被识别为 cmdlet 的名称” =].

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/ pi@192.168.0.80:~/raspberrypi.net.core"

我不确定到底是什么问题。我的想法是将我的 .net core 应用程序部署到我的 Raspberry Pi。我 运行 WSL1 在我 Windows.

问题是因为 VSCode 中的默认终端。所以我不得不将其更改为 Command Prompt。为此,只需在 VSCode 中按 F1 并输入“Terminal: Select Default Shell”,然后输入 select 命令提示符。

希望对您有所帮助。