Typescript: Loss of Syntax Highlighting & TS Project Settings after install of VS2015 TS1.8.6

Created on 15 Mar 2016  ·  20Comments  ·  Source: microsoft/TypeScript

I chose to upgrade Typescript today. I uninstalled TS1.7.X and installed the latest VS2015 Tools for TS 1.8.6.

Since then I have lost syntax highlighting in visual studio and when I look at the properties of a project I get an error:

screen shot 2016-03-15 at 14 44 02

I suspect the issue was with the uninstall of the previous version rather than the install of 1.8.6.

Any ideas how I get the missing resources and syntax highlighting back?

High Priority

Most helpful comment

Can you try deleting: %localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache, running devenv /setup from the Developer Command Prompt for VS2015 (as an admin), and starting VS.

All 20 comments

@rankida can you share the install logs? %temp%\dd_TypeScript*?

also does repairing the TS1.8 installer fix the issue?

@mhegazy sadly a repair of TS1.8 has not fixed it. Nor has a reinstall of TS1.7.

All my install logs are attached. Sorry for the large dump of files.

dd_TypeScript_.zip

what version of VS do you have installed?

From the logs, looks like you installed 1.8.4 on 2016-02-23, was that when it stooped working? or were there issues before that?

Sorry I should have added that info to the original post. I am running VS2015 Community Update 1

Microsoft Visual Studio Community 2015
Version 14.0.24720.00 Update 1
Microsoft .NET Framework
Version 4.6.01038

Installed Version: Community
...
TypeScript   1.8.6.0
TypeScript tools for Visual Studio

My current issues started today (around 3 hours ago) when I uninstalled TS1.7 and installed TS1.8, but I am also the originator of issue #7210. To resolve #7210 I ended up uninstalling the previous version of TS1.8 and re-installing TS1.7. With the new release of 1.8 I thought I would give it a go today, but it has not gone smoothly.

Looking at other issues I see #7445 which relates to failed builds due to the COMPUTE_PATHS. I also got this after my uninstall/reinstall but a restore of TS fixed it.

looks like multiple issues here.. the net result is an inconsistent state..
i need to know where to start looking.. here is what i see:

2016-03-15 15:05:22 repair 1.8.6 dd_TypeScript_Dev14_20160315150522.log

2016-03-15 15:02:21 install 1.7.4 dd_TypeScript_Full_20160315150222.log

2016-03-15 15:02:5 repair 1.7.6 dd_TypeScript_Full_20160315150251.log

2016-03-15 14:32:18 instal 1.7.6  dd_TypeScript_Full_20160315143220.log

2016-03-15 14:28:21 repair 1.8.6 dd_TypeScript_Dev14_20160315142819.log

2016-03-15 14:18:41 install 1.8.6 dd_TypeScript_Dev14_20160315141841.log

2016-03-15 14:15:11 uninstall 1.7.6   dd_TypeScript_Full_20160315141510.log

2016-03-15 14:05:34 install 1.8.6 dd_TypeScript_Dev14_20160315140534.log

2016-02-24 14:17:45 install 1.7.6 dd_TypeScript_Full_20160224141745.log

2016-02-24 14:14:51 uninstall 1.8.4 dd_TypeScript_Dev14_20160224141449.log

2016-02-24 14:00:50 uninstall 1.7.4 dd_TypeScript_Full_20160224140050.log

2016-02-23 14:19:45 install 1.8.4 dd_TypeScript_Dev14_20160223141945.log

2015-12-19 15:29:24 install 1.7.4 dd_TypeScript_Full_20151219152924.log

When was it working last? and what is happening now? can you edit files? can you build? what is the version of C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8\tsc.exe, C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\TypeScript.Tasks.dll, and C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript\Microsoft.VisualStudio.LanguageServices.TypeScript.dll?

Sorry for the mess. Once I broke things I tried very hard to try and fix it.

I have been using TypeScript 1.7.6 successfully for a number of weeks. I started the upgrade to 1.8.6 at 2016-03-15 14:05:34 but Visual Studio was still running so I cancelled the install. I then thought I should uninstall the previous version, so you see the uninstall of 1.7.6 at 2016-03-15 14:15:11 and then proceeded to install the upgrade at 2016-03-15 14:18:41.

Having completed the above I was left with a system that was unable to build (COMPILE PATHS issue), errored in the project settings (as posted originally), syntax highlighting was lost, and compile on save did nothing. I then proceeded to perform 2016-03-15 14:28:21 repair 1.8.6 and 2016-03-15 14:32:18 instal 1.7.6 after which I was able to build the typescript from a project build, but the projects settings, syntax highlighting and compile on save still did not work. I have not managed to improve on this situation, though you can see I did try other installs/repairs with no success.

I am considering, though have not yet done, a repair of visual studio to see if that would fix it.

As for versions of files:

  • C:\Program Files (x86)\Microsoft SDKsTypeScript\1.8\tsc.exe
    screen shot tsc
  • C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0TypeScriptTypeScript.Tasks.dll
    screen shot typescript tasks
  • C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\MicrosoftTypeScript\Microsoft.VisualStudio.LanguageServices.TypeScript.dll
    screen shot languageservices

Can you try deleting: %localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache, running devenv /setup from the Developer Command Prompt for VS2015 (as an admin), and starting VS.

@paulvanbrenk Thanks!! That worked! I deleted ComponentModelCache and ran devenv /setup as admin and now I have syntax highlighting, compile on save and can view the TS settings in a project's properties. A few of my colleagues have also experienced similar issues (they ended up performing a system restore) so I will share the solution with them.

I have uploaded the copy of ComponentModelCache that I removed, if it is helpful. Ideally an uninstall/reinstall of TypeScript shouldn't corrupt Visual Studio, but I am just happy with the fix.

Thanks again!

ComponentModelCache_deleted_because_TS18_16032016.zip

Encountered the same issue with VS2015 update 3 and TypeScript Tools for VS 2015 2.0.6. Same fix worked, thanks!

That didn't worked for me!!
What else can I do?

@paulvanbrenk , thank you. This worked for me on VS 2015 and TS 2.3.1.0

Issue: Loss of Syntax Highlighting, Loss of ability to comment or uncomment code in visual studio for typescript files, unable to perform Ctrl + K and Ctrl + D
In my case the TS version is Version 2.1.4. and VS 2015 Update 3, Installing and uninstalling TS does not work.
I find the whole folder C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\MicrosoftTypeScript had only one file, TypeScriptTemplateRegistration.pkgdef
Also TypeScriptSourceMapReader.dll was missing from C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies

Solution:

  1. I take from a friend the contents of the folder C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\MicrosoftTypeScript and paste it in mine.
  2. I also copy the file, TypeScriptSourceMapReader.dll(_from a friend_) at from C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies
  3. I go to C:\Users\10251338\AppData\Local\Microsoft\VisualStudio\14.0ComponentModelCache and delete all files
  4. I go to command prompt(as admin), navigate to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE> and run devenv /setup
  5. Start Visual Studio and everything magically works.

@paulvanbrenk thanks a lot. Your fix also worked for me too. I had installed TS 2.2.1.0 on VS 2015 but the syntax highlighting wasn't working.

@paulvanbrenk thanks a lot. it's working for me, I have VS 2015 Update 3. and TS 1.8

Thanks it works for me too as a charm:)

@paulvanbrenk thanks a lot. Your fix also worked for me too. I had installed TS 2.4.1.0 for vs 2015 on VS 2015 update 3.

:)

@paulvanbrenk Thanks!

FWIW... I just had to delete the ComponentModelCache directory and then start Visual Studio 2015 and it worked. (didn't need to run devenv /setup)

I have this issue on VS2017, and the above fix doesn't work :'(

Was this page helpful?
0 / 5 - 0 ratings