[英]Visual Studio 2017 TypeScript fails to save
I have never used TypeScript before and so perhaps I am misunderstanding how to use it. 我以前从未使用过TypeScript,所以也许我误会了如何使用它。 I right click and say new create a xxx.ts file, I write some code in it and click save.
我右键单击并说新建一个xxx.ts文件,我在其中编写了一些代码,然后单击保存。 Clicking save tries to make the new file dialog pop up, and it says that there is already a TypeScript file present, I close the dialog and try again and VS 2017 crashes.
单击“保存”会尝试弹出新文件对话框,并说已经存在一个TypeScript文件,我关闭对话框后再试一次,VS 2017崩溃。 I am sorry for the brief amount of information.
抱歉,请您提供简短的信息。 However it is as simple as that, I create a new ts file write some code attempt to save and it thinks I created a new file.
但是就这么简单,我创建了一个新的ts文件,并写了一些代码尝试保存,并认为我创建了一个新文件。
Also I notice that after a fresh boot of VS I can save my typescript files, although after about a few minutes this create a new file behavior starts. 我还注意到,在VS全新启动后,我可以保存我的打字稿文件,尽管大约几分钟后,创建新文件的行为开始了。
Another odd problem is opening a folder with the file explorer that has a .ts file in I cannot right click the .ts file. 另一个奇怪的问题是,使用文件浏览器打开的文件夹中有一个.ts文件,我无法右键单击.ts文件。 Doing so crashes Windows explorer.
这样做会使Windows资源管理器崩溃。
I am a clean install of Windows 10, just did a reset. 我是Windows 10的全新安装,只是进行了重置。 Only installed VS 2017 and SQL Server 2016.
仅安装VS 2017和SQL Server 2016。
Update Instead of removing the KB mentioned below, install this one which fixes the bug introduced by KB4013429: http://www.catalog.update.microsoft.com/Search.aspx?q=KB4015438 更新而不是删除下面提到的KB,请安装此更新来解决KB4013429引入的错误: http : //www.catalog.update.microsoft.com/Search.aspx? q = KB4015438
I have the same problem with Intellij Idea. 我对Intellij Idea有同样的问题。 I suspect that https://support.microsoft.com/en-us/help/4013429/windows-10-update-kb4013429 could have something in common.
我怀疑https://support.microsoft.com/en-us/help/4013429/windows-10-update-kb4013429可能有一些共同之处。 There is known issue ' Windows DVD Player (and 3rd party apps that use Microsoft MPEG-2 libraries) crashes when run ' and '*.ts' files are also ' compresses video data using standard MEPG-2 (.MPEG) video compression '.
存在一个已知问题“运行时Windows DVD Player(以及使用Microsoft MPEG-2库的第三方应用程序)崩溃 ”,并且* .ts文件也“ 使用标准MEPG-2(.MPEG)视频压缩来压缩视频数据 ” 。
Removing this update (kb4013429) helps a little. 删除此更新(kb4013429)会有所帮助。
Short answer: make sure those typescript files are not indexed. 简短的答案:确保没有为这些打字稿文件建立索引。
One way (this is how on Windows 10) 一种方式(在Windows 10上是这样)
Deselect "Allow files in this folder to have contents indexed in addition to file properties." 取消选择“除了文件属性之外,还允许该文件夹中的文件具有索引的内容”。
I found the general idea by 我发现了一般想法
This gets you past this bug until they fix it. 这样您就可以越过该错误,直到他们修复它。
Also I notice that after a fresh boot of VS I can save my typescript files, although after about a few minutes this create a new file behavior starts.
我还注意到,在VS全新启动后,我可以保存我的打字稿文件,尽管大约几分钟后,创建新文件的行为开始了。
Follow the report a problem workflow for Visual Studio: https://docs.microsoft.com/en-us/visualstudio/ide/how-to-report-a-problem-with-visual-studio-2017 遵循针对Visual Studio的问题工作流程报告: https : //docs.microsoft.com/zh-cn/visualstudio/ide/how-to-report-a-problem-with-visual-studio-2017
Your useage of TypeScript is correct. 您对TypeScript的使用是正确的。 Visual studio (at least your installation) seems to have a bug.
Visual Studio(至少是您的安装)似乎存在错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.