Could not find the preLaunch task 'build'

前端 未结 4 2087
死守一世寂寞
死守一世寂寞 2020-12-14 06:05

To configure Visual Studio Code to debug C# scripts on OSX, I followed through all the steps listed in the article below:

Debugging C# on OSX with Visual Studio Cod

4条回答
  •  生来不讨喜
    2020-12-14 06:42

    It seems like this will be different for every scenario.

    For me what @Jeferson Tenorio worked, but it needed a few more steps so let's add them:

    1. Click on Configure Task:
    2. Create tasks.json file from template
    3. .NET Core Executes .NET Core build commands
    4. Go to your launch.json file, and under configurations/program you will find this:

      ${workspaceFolder}/bin/Debug//.dll

      Simply replace and with your target framework, in my case that would be netcoreapp2.0 and then your project name (if you haven't changed anything your project name should be the same as the folder where you created your project), it should look something like this:

      "program": "${workspaceFolder}/bin/Debug/netcoreapp2.0/MyProject.dll"

      I hope this helps.

提交回复
热议问题