Visual Studio 2015 - 编辑 TypeScript 文件 [英] Visual Studio 2015 - Editing TypeScript files

查看:36
本文介绍了Visual Studio 2015 - 编辑 TypeScript 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于某种奇怪的原因,我无法*在 Visual Studio 2015 中编辑 TypeScript 文件.真正奇怪的是我可以创建新行并添加选项卡,但没有其他功能.

For some odd reason, I cannot* edit TypeScript files in Visual Studio 2015. The really weird thing is that I can create new lines and add tabs, but nothing else.

我尝试更新到最新版本的 VS2015 TypeScript 无济于事.我想可能与项目有关,所以我打开了一个 ts 文件而没有加载项目 - 同样的问题.我看到其他一些帖子指出 ReSharper 缓存存在问题,所以我尝试删除它们并禁用 Re# - 没有运气.

I tried updating to the latest version of TypeScript for VS2015 to no avail. I thought maybe it was project related so I opened a ts file without having a project loaded - same problem. I saw some other posts indicating problems with ReSharper cache, so I tried deleting those as well as disabling Re# - no luck.

有人有什么想法吗?

谢谢.

推荐答案

我遇到了同样的问题,但幸运的是我很快就解决了.

I faced the same problem but fortunately I solved it quite soon.

在某些时候,VS 2015 中的 ts 文件的编辑停止工作,我注意到它发生在我更新 tsconfig.json 文件之后.原来这个问题是由我在文件开头留下的注释引起的(我已经注释掉了示例配置并在它下面添加了实际配置).

At some point editing stopped working for ts file in VS 2015 and I noticed that it happened after I updated tsconfig.json file. It turned out that this issue was caused by comments I left at the beginning of the file (I had commented out sample config and added actual config below it).

这看起来很奇怪,但在玩过配置文件后,所有疑虑都消失了.

This looks weird but after playing with the config file all doubts were gone.

这篇关于Visual Studio 2015 - 编辑 TypeScript 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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