如何配置任务运行/调试C#控制台应用程序在vscode [英] how to config task to run/debug C# console app in vscode

查看:1496
本文介绍了如何配置任务运行/调试C#控制台应用程序在vscode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从// build,我看到运行nodejs和asp net的凉爽5
我试图使用vscode运行一些基本的C#控制台应用程序。我应该如何配置任务构建和运行/调试它?是否有任何样本?

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?

推荐答案

yeoman aspnet生成器有一个ConsoleApplication模板,将在VSCode中工作。

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


  1. 安装ASP.NET和DNX(根据您的操作系统,请参阅此处的说明: https://code.visualstudio.com/Docs/ASPnet5

安装yeoman依赖项并生成yeoman aspnet项目(选择控制台应用程序)

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

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

yo aspnet

创建和:

dnu restore

现在可以在VSCode中打开目录。打开命令面板(command-shift-P)并键入 run

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


$ b b

编辑:
不过请注意,尽管基于单声道的C#调试在Linux和OSX中工作,但ASP.NET 5调试在预览版本中仍然无效。

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.

这篇关于如何配置任务运行/调试C#控制台应用程序在vscode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆