继续获取"tsc.exe";用代码1退出 [英] Keep getting "tsc.exe" exited with code 1

查看:33
本文介绍了继续获取"tsc.exe";用代码1退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将tsconfig.json文件添加到Visual Studio 2015 Web解决方案后,立即出现上述错误.

As soon as I add a tsconfig.json file to my Visual Studio 2015 web solution I get the above error.

即使我将"compileOnSave"设置为true,这也会阻止编译器重新生成js文件.

Also this stops the compiler from re-generating js files even when I set "compileOnSave": true.

当我双击错误时,它将带我进入Microsoft.Typescript.Targets文件,该文件包含很多问题,例如未知项目组"TypeScriptCompile".在错误列表中,这些显示为警告,但是无论我是否具有tsconfig.json文件,它们都在那里.

When I double click the error it takes me into the Microsoft.Typescript.Targets file which contains a lot of issues such as Unknown Item Group "TypeScriptCompile". In the error list these appear as warnings but they are there whether I have a tsconfig.json file or not.

有什么方法可以解决该问题或获得有关问题所在的更多信息?

Is there any way of solving it or getting more information on what the problem is?

推荐答案

安装以下2个NuGet软件包:

Install these 2 NuGet packages:

Microsoft.TypeScript.MSBuild Microsoft.TypeScript.Compiler

它使用MSBuild任务定义和TS编译器更新您的项目,并解决了编译问题

It updates your project with MSBuild task definition and TS compiler and solves the compilation issue

这篇关于继续获取"tsc.exe";用代码1退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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