visual-studio - Typescript 2.0 tsc.exe 代码 1 错误(升级后)

标签 visual-studio angular typescript visual-studio-2015 compiler-errors

我在 VS2015 中使用 typescript 中的 angular2 制作我的项目。偶尔我遇到错误: 错误 MSB6001:“tsc.exe”的命令行开关无效。路径中的非法字符。 我不记得上次我是怎么克服它的,我想它在没有我的互动的情况下就消失了。但今天这个错误不想消失。 我安装了 TS 2.0 RC 因为我认为这是一个错误并且它已在新版本中修复。但现在我得到 error Severity Code Description Project File Line Suppression State Error MSB6006 "tsc.exe" exited with code 1. MGMS.Web C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\Microsoft.TypeScript.targets 222

你能帮我吗?

这是我的诊断日志 http://www.filedropper.com/diagnosticlog

和项目 http://www.filedropper.com/project_11

[2016 年 9 月 4 日] 我试图弄清楚并更改 Microsoft.TypeScript.targets 文件以使用工具的硬编码值 1.8。有效。我不知道是怎么回事,因为在安装 Typescript 2.0 之前它不能正常工作,但现在可以了。为了确保它适用于我所有的团队成员,我在 xproj 中添加了两行

<PropertyGroup> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> <TypeScriptNuGetToolsVersion>1.8</TypeScriptNuGetToolsVersion> <TypeScriptToolsVersion>1.8</TypeScriptToolsVersion> </PropertyGroup>

我还尝试在 visualstudioonline 中对我的解决方案运行持续集成。但这里它不适用于 tsc.exe 的相同错误 1。这很有趣,因为日志显示 visualstudioonline 在 1.8 版本中正确使用了 tsc.exe。伙计们,这是怎么回事?

我尝试从命令行运行 tsc.exe v2.0,它显示的错误与第一个诊断日志中的一样。

最佳答案

与此同时,新版本的 tsc 编译器问世了。这只是特定安装的问题(不知道为什么)。干净的系统+干净的安装解决了问题。

关于visual-studio - Typescript 2.0 tsc.exe 代码 1 错误(升级后),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39318408/

相关文章:

javascript - "Property json does not exist on type {}" typescript

reactjs - 在 React 中,如何使用 Typescript 限制子进程的数量?

python - Visual Studio 中的 Windows 窗体与 Python

angular - 在Angular2 Dart中显示嵌套的子级子组件

angular - 具有 Angular 6 的 GRPC Web 客户端

javascript - 带有 Angular 6 的 Firebase 导入问题?

python - IronPython visual studio 控制台应用程序 : no module named clr

c++ - 如何使用 ms code gen 添加/bigobj 切换到 clang?

c# - Visual Studio Windows 窗体 "Value does not fall within the expected range."

Angular 5 : how do I route all paths for an outlet to the same component using only 1 route?