Visual Studio and/or Windows Explorer Crash with TypeScript Files
Asked Answered
A

3

5

In Windows Explorer, whenever I try to open a folder that contains TypeScript files, explorer freezes and crashes. When I try to edit TypeScript files in Visual Studio, it allows me to do so until I save the file. When I save the file, Visual Studio crashes without any dialogs.

I tried completely removing anything Visual Studio related (uninstall, registry clean, etc.) and reinstalling. I also tried running Windows in safe mode, and/or running Visual Studio in safe mode, none of which work. Running Visual Studio as an administrator also does not work.

I know it is not an issue with the actual repo since these files work fine on several other developer machines. This functionality was working just fine a month ago, with no changes in updates or installed extensions.

I am running Visual Studio 2015 Update 3 (14.0.25431.01) on a Windows 10 64-bit machine. TypeScript Tools for Visual Studio is at version 2.2.1.0.

Please let me know if there are any logs I can provide, I'm not sure where to get them.

Arleyne answered 26/2, 2017 at 22:40 Comment(5)
If I create a brand new TypeScript file using notepad, and save it on my desktop, then my desktop becomes completely inaccessible and prevents Windows Explorer from starting...Arleyne
sounds like something an antivirus should have a look at. :)Worsham
Could it be a corruption in the registered utility to open typescript files on your machine? Maybe try changing it to Notepad (All Settings > System > Default Apps > Choose default applications by file type - then find the file extension you want to change and change the default app) and see if that solves the issue? Sounds like the computer is reacting badly to being unable to load an icon or if they're assigned to an application which isn't working properly. (Edit: In terms of logs, look in Event Viewer - that may have some in Windows Logs > Application)Eros
All virus scans show up negative, and there's no strange behavior. Changing the file association to notepad unfortunately doesn't work. File icon renders just fine.Arleyne
The problem has appeared on my computer in the last few days, and apparently others, too: developercommunity.visualstudio.com/content/problem/31003/…Nominal
A
2

UPDATE:

Many people have reported this issue as being the result of Windows Update KB4013429. This affects all Visual Studio installations. To resolve the issue, simply uninstall this update and restart your PC.


Old "Solution":

I solved the problem by reinstalling/cleaning Windows.

I know that's not a very good answer, but I wasn't able to solve the issue otherwise. Disabling antivirus shields did not work, and neither did running in safe mode. I think something in the registry may have gotten corrupted during a Visual Studio reinstall. Would love to hear any actual solutions if anyone else comes across this problem in the future.

Arleyne answered 1/3, 2017 at 15:32 Comment(0)
D
5

The following update fixes this issue: Cumulative Update for Windows 10 Version 1607 for x64-based Systems (KB4015438).

This is as of March 20, 2017.

Dendrite answered 26/3, 2017 at 21:13 Comment(0)
A
2

UPDATE:

Many people have reported this issue as being the result of Windows Update KB4013429. This affects all Visual Studio installations. To resolve the issue, simply uninstall this update and restart your PC.


Old "Solution":

I solved the problem by reinstalling/cleaning Windows.

I know that's not a very good answer, but I wasn't able to solve the issue otherwise. Disabling antivirus shields did not work, and neither did running in safe mode. I think something in the registry may have gotten corrupted during a Visual Studio reinstall. Would love to hear any actual solutions if anyone else comes across this problem in the future.

Arleyne answered 1/3, 2017 at 15:32 Comment(0)
M
1

I deleted a lot of stuff in the Registry under HKEY_CLASSES_ROOT\.ts, and now I can at least view folders in Explorer that contains .ts files, but I still cannot right-click them.

The biggest problem for me and my colleague was that Git and Visual Studio was unable to overwrite .ts files sometimes ("permission denied"), and we couldn't delete them manually either.

I'm not quite sure this has solved the problem permanently for me, but it seems so at the moment:

I used Handle to determine that SearchProtocolHost.exe had locked my .ts file, and wouldn't release until a few minutes later.

A few Google searches later, and I have now disabled indexing .ts files in Windows Search. So far, no more locks!

Mezzosoprano answered 17/3, 2017 at 14:18 Comment(2)
I was hoping to try this but Indexing Options does not appear to be available in my Windows 10 Home. Not under control panel. Not by searching via the start button.Plattdeutsch
This did not prevent Visual Studio from crashing when adding a Typescript file to a project by dragging from Explorer.Nominal

© 2022 - 2024 — McMap. All rights reserved.