【发布时间】:2016-06-16 10:30:12
【问题描述】:
我在 VS2015 中开发了带有 typescript 和 angular2 的 asp.net 核心应用程序。 我正在尝试将其移至 vscode。 我已经使用 dotnet 命令创建了新项目并开始设置依赖项、工具等。 我设置了调试.net核心应用程序的任务(它是由vs代码创建的) 现在我正在研究如何在监视模式下设置构建 typescript 并运行 gulp 任务。 VS 代码之前为我提供了为 TS 创建命令,但据我了解,只能有 1 个命令!那么,如何以最正确的方式让 asp.core 应用程序在调试以及 TS 编译、tslint 处理和 vscode 中的 gulp 任务的同时运行,并从所有这些工具输出到 vscode?p>
打字稿任务:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "tsc",
"isShellCommand": true,
"args": ["-w", "-p", "."],
"showOutput": "silent",
"isWatching": true,
"problemMatcher": "$tsc-watch"
}
dotnet 的任务:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "dotnet",
"isShellCommand": true,
"args": [],
"tasks": [
{
"taskName": "build",
"args": [ ],
"isBuildCommand": true,
"showOutput": "silent",
"problemMatcher": "$msCompile"
}
]
}
【问题讨论】:
-
您也应该添加 [asp.net-core] 标签。这样,当有人搜索 asp.net core 时,您的问题就会出现。仅使用 [asp.net-core-1.0] 标记,您的问题仅在人们在搜索中包含 1.0 时才会显示。
标签: typescript angular asp.net-core visual-studio-code asp.net-core-1.0