20

I have lost the support for JavaScript files inside Visual Studio 2015 after updating the TypeScript tools from version 1.5.3 to 1.5.4.

By support for JavaScript I mean intellisense, syntax coloring and the JavaScript options inside Options menu -> Text Editor.

My js files look like txt files now.

I have already tried many things:

  1. The steps in this answer: Visual Studio 2015 CTP - Javascript support missing
  2. Repair TypeScript Tools
  3. Repair Microsoft Asp.Net and Web Tools 2015
  4. Repair entire Visual Studio 2015

Nothing worked.

Does anyone knows a solution for this problem?

Axifive
  • 1,159
  • 2
  • 19
  • 31
Augusto Barreto
  • 3,637
  • 4
  • 29
  • 39
  • thx for the warning. came here while searching for release notes. anyone knows where they would be? – citykid Aug 08 '15 at 20:11
  • 1
    @citykid I don't know. I was unable to find any public info, web site or repo of the TypeScript 1.5 Tools for VS 2015. Maybe you could have better luck asking it here: https://visualstudiogallery.msdn.microsoft.com/3e5ba71c-abea-4d00-b81b-a62de3ad3d53 – Augusto Barreto Aug 08 '15 at 20:17

3 Answers3

28

This is a known bug that we have fixed in VS 2015, however you could have been affected if you installed the "Universal Windows App Development Tools" during a specific period of time. We will soon be publishing a KB with the following workaround:

If the “Universal Windows App Development Tools” are still installed:

  1. Go to Programs and Features, select Visual Studio 2105, click Change.
  2. In Visual Studio setup, click Modify.
  3. Deselect the feature “Universal Windows App Development Tools”
  4. Select “Universal Windows App Development Tools” again, and click Update.

If you have already uninstalled the “Universal Windows App Development Tools”:

  • Reinstall “Universal Windows App Development Tools”
  • Or, take the following steps to reinstall the JavaScript project system and language service:
    1. Download the installer for your edition of Visual Studio, e.g. vs_community.exe.
    2. Open a CMD window, and run the following command: vs_community.exe /modify /installselectableitems JavaScript_Hidden /passive

Sorry for the trouble. Hope that helps.

Cristian Ciupitu
  • 20,270
  • 7
  • 50
  • 76
Michael Braude
  • 6,913
  • 1
  • 22
  • 20
  • 1
    Works for me. Thank you! – SerjG Aug 08 '15 at 23:22
  • Indeed I selected the tools for universal apps development when I installed VS this week on a fresh installation of Windows 10. I'll try your workaround this night. Thanks Michael! – Augusto Barreto Aug 08 '15 at 23:32
  • 1
    @AugustoBarreto me too for sure. But "Emulators for Windows Mobile 10.0.10240" option was unselected on the second attempt. https://github.com/Microsoft/TypeScript/issues/4238#issuecomment-129062060 – SerjG Aug 08 '15 at 23:34
  • @Sergey Thanks! I didn't even know that there is a GitHub repo for TypeScript. – Augusto Barreto Aug 08 '15 at 23:38
  • @Michael Braude It worked! Now I have TypeScript Tools 1.5.4 and JavaScript support is still working. Thanks. – Augusto Barreto Aug 09 '15 at 02:06
  • 2
    Glad that worked for you guys. FYI, we have added this to the list of known VS 2015 issues, which you can find here: https://support.microsoft.com/en-us/kb/3025135 – Michael Braude Aug 10 '15 at 20:44
  • Thank you! FYI - for those doing this fix it took around 30 minutes to complete. – Steve French Aug 13 '15 at 16:09
  • After reinstall `Tools and Windows SDK 10.0.10240`, and `devenv /updateconfiguration` & `devenv /clearcache`, it works now. – ChrisTorng Sep 07 '15 at 06:01
  • Running VS2015 Update 1, I deselected Universal Apps and selected it again - the Update button keeps greyed out. – Bruno Brant Feb 22 '16 at 05:40
5

Found a workaround to rollback to TypeScript 1.5.3 and get back support for JS:

  1. From Programs and Features, uninstall TypeScript Tools 1.5.4 and Microsoft Asp.Net and Web Tools 2015
  2. Download VS 2015 offline installer (Reference: How to install VS2015 Community Edition offline)
  3. Inside the download directory from step 2, navigate to "packages\WPT" and install "webtoolsextensionsvs14.msi" (Microsoft Asp.Net and Web Tools 2015)
  4. Then navigate to the folder (inside the download directory) "OfflineCache\installers". You will see two TS folders: "TypeScriptV1" and "TypeScriptV2". They are the installers for the versions 1.5.3 and 1.5.4 respectively.
  5. Install TypeScript Tools 1.5.3 (using the installer inside the folder "TypeScriptV1")

Now, start Visual Studio. At this point JavaScript support should be back, and TS support still available.

NOTE: there is no independent installer for TypeScript Tools for VS 2015 (Reference: Typescript 1.5 for VS2015 without internet access)

UPDATE:

As Mohamed Hegazy noted, the TypeScript installers are available to download on: TypeScript for Visual Studio 2015

Community
  • 1
  • 1
Augusto Barreto
  • 3,637
  • 4
  • 29
  • 39
1

In my case, here is the way I fixed it:

Tools > Options > Text Editor > JavaScript > Intellisense > References

  1. Make sure you Implicit (Web) is selected under Reference Group
  2. Make sure that ~/Scripts/references.js is added in the include files list

Hope it will help you

Monah
  • 6,714
  • 6
  • 22
  • 52