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

柔情痞子 提交于 2020-01-01 05:08:07

问题


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 it? is there any sample?


回答1:


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.



来源:https://stackoverflow.com/questions/29980793/how-to-config-task-to-run-debug-c-sharp-console-app-in-vscode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!