how to config task to run/debug C# console app in vscode

前端 未结 1 646
再見小時候
再見小時候 2021-02-15 12:43

from //build, i see the coolness of running nodejs and asp net 5 i am trying to use vscode to run some basic C# console app. how should i config the task to build and run/debug

相关标签:
1条回答
  • 2021-02-15 13:04

    The yeoman aspnet generator has a ConsoleApplication template that will work in VSCode.

    1. Install ASP.NET and DNX (according to your OS see the instructions here: https://code.visualstudio.com/Docs/ASPnet5)

    2. Install yeoman dependencies and generate a yeoman aspnet project (choose Console Application)

      npm install -g yo grunt-cli generator-aspnet bower

      yo aspnet

    3. cd to your project dir you just created and:

      dnu restore

    4. Now you can open the dir in VSCode. Open the command palette (command-shift-P) and type run

    EDIT: Note however that while mono-based C# debugging works in Linux and OSX, ASP.NET 5 debugging does not yet work in the preview version.

    0 讨论(0)
提交回复
热议问题