Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lost JavaScript support in VS2015 RTM after updating to TypeScript 1.5.4 #4238

Closed
mwinkler opened this issue Aug 8, 2015 · 33 comments
Closed

Lost JavaScript support in VS2015 RTM after updating to TypeScript 1.5.4 #4238

mwinkler opened this issue Aug 8, 2015 · 33 comments

Comments

@mwinkler
Copy link

@mwinkler mwinkler commented Aug 8, 2015

I completely lost JavaScript support in Visual Studio after updating to TypeScript 1.5.4:

  • Code inside script tags gets no colorization and no IntelliSense at all
  • In the VS options menu > Text Editor > JavaScript is missing
  • In the output console, the "JavaScript Language Service" is missing in the dropdown.

Seems I'm not the only one:
http://stackoverflow.com/questions/31888115/visual-studio-2015-rtm-lost-js-support-after-update-typesript-tools

@mwinkler mwinkler changed the title Lost JavaScript support in VS2015 RTM after updating TypeScript 1.5.4 Lost JavaScript support in VS2015 RTM after updating to TypeScript 1.5.4 Aug 8, 2015
@jonstelly

This comment has been minimized.

Copy link

@jonstelly jonstelly commented Aug 8, 2015

Same. JavaScriptWebExtensionsPackage fails to load. ActivityLog.xml shows:

SetSite failed for package [JavaScriptWebExtensionsPackage]

@paulvanbrenk

This comment has been minimized.

Copy link
Contributor

@paulvanbrenk paulvanbrenk commented Aug 8, 2015

Does the IntelliSense work in a stand alone javascript file?

@mbraude

This comment has been minimized.

Copy link

@mbraude mbraude commented Aug 8, 2015

Hi,

This is a known bug that we have fixed, however you could have been affected if you installed the "tools for universal apps development" during a specific period of time. There is a post on our MSDN forums with some steps, and we will soon be publishing a KB with the following workaround:

If the “Tools for Universal Windows Apps Development” 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 “Tools for Universal Windows App Development”
  4. Select “Tools for Universal Windows App Development” again, and click Update.

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

  • Reinstall “Tools for Universal Windows App Development”
  • 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.

@sguryev

This comment has been minimized.

Copy link

@sguryev sguryev commented Aug 8, 2015

Do you mean this option? That's what I have seen when have run the VS installer again (because I was not able to find VS2015 in the programs and features - Win 8.1 x64)
image

@mbraude

This comment has been minimized.

Copy link

@mbraude mbraude commented Aug 8, 2015

Yep, that's it.

@sguryev

This comment has been minimized.

Copy link

@sguryev sguryev commented Aug 8, 2015

After installing the missing Emulators for Windows Mobile 10.0.10240 I'm seeing the following:
image

Seems that it will work. Thank you!

UPD1: It works)

@mwinkler

This comment has been minimized.

Copy link
Author

@mwinkler mwinkler commented Aug 9, 2015

The re-installation of "Tools and Windows SDK 10.0.10240" brings back the JavaScript support and seems to work.

If i open a project, now i get this error:
vs-error

In the log file, this exceptions appear:

707  Begin package load [Microsoft.VisualStudio.JSLS.JavaScriptLanguageServicePackage, Microsoft.VisualStudio.JSLS, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] 

708  End package load [Microsoft.VisualStudio.JSLS.JavaScriptLanguageServicePackage, Microsoft.VisualStudio.JSLS, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] 

709 ERROR (2x times)
Microsoft.VisualStudio.Composition.CompositionFailedException: Expected 1 export(s) with contract name "Microsoft.VisualStudio.JavaScript.Web.Extensions.ReferenceAutoSync.IReferencesFilePathProvider" but found 0 after applying applicable constraints. at 
Microsoft.VisualStudio.Composition.ExportProvider.GetExports(ImportDefinition importDefinition) at 
Microsoft.VisualStudio.Composition.ExportProvider.GetExports[T,TMetadataView](String contractName, ImportCardinality cardinality) at 
Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T,TMetadataView](String contractName) at 
Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T](String contractName) at 
Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T]() at 
Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValue[T]() at 
Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[T]() at 
Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ComponentModelServiceProvider.GetService[T]() at 
Microsoft.VisualStudio.JavaScript.Web.Extensions.ReferenceAutoSync.ProjectData..ctor(IVsHierarchy project) at 
Microsoft.VisualStudio.JavaScript.Web.Extensions.ReferenceAutoSync.ProjectData.<>c__DisplayClass31_0.<GetOrCreate>b__0() at 
Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func`1 creator) at 
Microsoft.VisualStudio.JavaScript.Web.Extensions.ReferenceAutoSync.ProjectData.GetOrCreate(IVsHierarchy webProject, IWebProjectServices webProjectServices) at 
Microsoft.VisualStudio.JavaScript.Web.Extensions.Commands.CommandFilter..ctor(ITextView textView) at 
Microsoft.VisualStudio.JavaScript.Web.Extensions.Commands.WpfTextViewConnectionListener.HookupCommandFilter(IWpfTextView textView, IVsTextView textViewAdapter) at 
Microsoft.VisualStudio.JavaScript.Web.Extensions.Commands.WpfTextViewConnectionListener.SubjectBuffersConnected(IWpfTextView textView, ConnectionReason reason, Collection`1 subjectBuffers) at Microsoft.VisualStudio.Text.Editor.Implementation.ConnectionManager.<>c__DisplayClass4_1.<.ctor>b__1() at 
Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object errorSource, Action call)

711  Entering function CVsPackageInfo::HrInstantiatePackage 

712  Begin package load [CssPackage] 

713  End package load [CssPackage] 

714 ERROR (2x times)
Microsoft.VisualStudio.Composition.CompositionFailedException: Expected 1 export(s) with contract name "Microsoft.VisualStudio.JavaScript.Web.Extensions.ReferenceAutoSync.IReferencesFilePathProvider" but found 0 after applying applicable constraints. at 
Microsoft.VisualStudio.Composition.ExportProvider.GetExports(ImportDefinition importDefinition) at 
Microsoft.VisualStudio.Composition.ExportProvider.GetExports[T,TMetadataView](String contractName, ImportCardinality cardinality) at 
Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T,TMetadataView](String contractName) at 
Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T](String contractName) at 
Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T]() at 
Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValue[T]() at 
Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[T]() at 
Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ComponentModelServiceProvider.GetService[T]() at 
Microsoft.VisualStudio.JavaScript.Web.Extensions.ReferenceAutoSync.ProjectData..ctor(IVsHierarchy project) at Microsoft.VisualStudio.JavaScript.Web.Extensions.ReferenceAutoSync.ProjectData.<>c__DisplayClass31_0.<GetOrCreate>b__0() at 
Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func`1 creator) at 
Microsoft.VisualStudio.JavaScript.Web.Extensions.ReferenceAutoSync.ProjectData.GetOrCreate(IVsHierarchy webProject, IWebProjectServices webProjectServices) at 
Microsoft.VisualStudio.JavaScript.Web.Extensions.Commands.CommandFilter..ctor(ITextView textView) at 
Microsoft.VisualStudio.JavaScript.Web.Extensions.Commands.WpfTextViewConnectionListener.HookupCommandFilter(IWpfTextView textView, IVsTextView textViewAdapter) at 
Microsoft.VisualStudio.JavaScript.Web.Extensions.Commands.WpfTextViewConnectionListener.SubjectBuffersConnected(IWpfTextView textView, ConnectionReason reason, Collection`1 subjectBuffers) at 
Microsoft.VisualStudio.Text.Editor.Implementation.ConnectionManager.<>c__DisplayClass7_0.<OnGraphBuffersChanged>b__0() at 
Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object errorSource, Action call)
@mbraude

This comment has been minimized.

Copy link

@mbraude mbraude commented Aug 9, 2015

My guess is that only reinstalling the SDK didn't update the MEF cache. You can do this manually by following these steps:

  1. Open a command prompt as administrator.
  2. CD into C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
  3. Run devenv /updateconfiguration
  4. Run devenv /clearcache

If that doesn't fix it, please redo the steps I outlined above, but toggle the outer 'Universal App Development Tools' as in the screenshot above - not just the SDK. If you don't want the emulators you should be able to uncheck that option afterwards.

@mwinkler

This comment has been minimized.

Copy link
Author

@mwinkler mwinkler commented Aug 9, 2015

@mbraude Thank you, /updateconfiguration & /clearcache worked, error is gone.

@jaliyaudagedara

This comment has been minimized.

Copy link

@jaliyaudagedara jaliyaudagedara commented Aug 10, 2015

Faced the issue and got it fixed following the given steps.

Thanks.

@jonstelly

This comment has been minimized.

Copy link

@jonstelly jonstelly commented Aug 10, 2015

After updating the windows universal app development tools, I was still getting the same error. I had to delete the directory: %localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache

Everything seems to be working again. Thanks.

@jamesxv7

This comment has been minimized.

Copy link

@jamesxv7 jamesxv7 commented Aug 11, 2015

Хорошо иметь Google Translate близ.

@DanielRosenwasser

This comment has been minimized.

Copy link
Member

@DanielRosenwasser DanielRosenwasser commented Aug 11, 2015

@YuryStrozhevsky @sguryev could you limit discussion to English and keep things on topic with the issue? Translators only go so far, so it's difficult for most of us on the team to follow. 😄

@asiridissa

This comment has been minimized.

Copy link

@asiridissa asiridissa commented Aug 25, 2015

Faced this issue and fixed now..
Thanks.

@maiorfi

This comment has been minimized.

Copy link

@maiorfi maiorfi commented Sep 7, 2015

Same stuff after latest TypeScript update: same solution suggested worked for me, too.

@jerriep

This comment has been minimized.

Copy link

@jerriep jerriep commented Sep 8, 2015

Great, doing the devenv /updateconfiguration and devenv /clearcache finally solved it for me after weeks of frustration

@mhegazy mhegazy closed this Sep 10, 2015
@migajek

This comment has been minimized.

Copy link

@migajek migajek commented Sep 11, 2015

Hi, I'm having similar issue, i.e. opening any TypeScript file in VS2015 (TS 1.5.4.0) causes the error which is followed by automatic VS restart.
The thing is I haven't installed any of the Universal Windows App Dev Tools at all.

I've also tried updateconfiguration and clearcache, no luck ufortunately

System.Runtime.InteropServices.COMException (0x80020006): Nieznana nazwa. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))&#x000D;&#x000A;   at 
System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)&#x000D;&#x000A;   at 
System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)&#x000D;&#x000A;   at 
Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.Proxies.Reflection.InvokeMethod[T](Object languageService, String methodName, Object[] arguments)&#x000D;&#x000A;   at 
Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.Proxies.AbstractProxy`1.InvokeShimMethod[T](String methodName, Object[] arguments)&#x000D;&#x000A;   at 
Microsoft.CodeAnalysis.Editor.TypeScript.ScriptServices.Proxies.ClassifierProxy.GetLexicalClassifications(String text, Int32 lexState)&#x000D;&#x000A;   at 
Microsoft.CodeAnalysis.Editor.TypeScript.Features.Classifier.LexicalClassificationTaggerProvider.Classifier.GetLexicalClassifications(ClassifierProxy classifier, String text, Int32 lineNum)&#x000D;&#x000A;   at 
Microsoft.CodeAnalysis.Editor.TypeScript.Features.Classifier.LexicalClassificationTaggerProvider.Classifier.GetClassifications(NormalizedSnapshotSpanCollection spans, List`1 result)&#x000D;&#x000A;   at 
Microsoft.CodeAnalysis.Editor.TypeScript.Features.Classifier.LexicalClassificationTaggerProvider.Classifier.GetTags(NormalizedSnapshotSpanCollection spans)&#x000D;&#x000A;   at 
Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.&lt;GetTagsForBuffer&gt;d__38.MoveNext()
@mbraude

This comment has been minimized.

Copy link

@mbraude mbraude commented Sep 11, 2015

@migajek - I'm sorry for your trouble but this sounds like a different problem than what's discussed in this issue.

@migajek

This comment has been minimized.

Copy link

@migajek migajek commented Sep 11, 2015

@mbraude ok I've created #4752
thank you!

@timothyleerussell

This comment has been minimized.

Copy link

@timothyleerussell timothyleerussell commented Sep 20, 2015

@mbraude Thanks a lot!

I didn't have to do the uninstall / reinstall. Just the /updateconfiguration and /clearcache switches.

Fixed other problems for me as well, so bonus! Recent projects now show up in the recent projects list and my source control plugin now correctly flags the solution node when its status changes.

@jimmymain

This comment has been minimized.

Copy link

@jimmymain jimmymain commented Oct 1, 2015

This is still an issue with typescript 1.6.3.
I have removing and installing components for an hour now. This needs attention, it's wasting a lot of time.

@mbraude

This comment has been minimized.

Copy link

@mbraude mbraude commented Oct 1, 2015

I'm sorry for your trouble @jimmymain, but I promise you the steps I outlined above will fix the issue. Please follow them exactly.

@asleight

This comment has been minimized.

Copy link

@asleight asleight commented Oct 19, 2015

I'm having the same trouble with VS 2015 Community Edition with the same error in the ActivityLog.

  1. Running the Modify cycle on VS 2015 doesn't solve the problem.
  2. Running the devenv /updateconfiguration does nothing. At all. It ignores the argument and doesn't start VS. (Note: It will start normally if I drop the argument and just type "devenv", and "devenv /?" produces arguments that only deal with Solution files.)

It may be worth noting that my installation is at C:\Program Files (x86)\Visual Studio Community 2015\Common7\IDE (my Visual Studio 14.0 directory is there, but virtually empty).

I wasn't sure whether one of these two things is causing a unique situation, but it's quite frustrating! I want to push my (small) organization to use .NET 5.0 instead of Java for website building, and these issues are worrying. I don't want the general feel of .NET 5.0 to be "neat idea, but it's a pain to get it working properly".

Edit: On a whim, I tried jonstelly's suggestion of deleting %localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache folder, and that seems to solve the issue. It's worth noting that the two "approved" fixes didn't fix my issue, and this third one did the trick.

@paulvanbrenk

This comment has been minimized.

Copy link
Contributor

@paulvanbrenk paulvanbrenk commented Oct 19, 2015

@asleight where did you get the VS2015 Community Edition from, I've been running that and it consistently get's installed in the VS 14 folder.

Glad you got the issue re-solved.

@artganify

This comment has been minimized.

Copy link

@artganify artganify commented Oct 30, 2015

Having still the same issue, and it comes up again with every new TS update.

Could not load file or assembly 'Microsoft.VisualStudio.JSLS, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

My problem is that I can only fix it temporary. After a while, it pops up again and I have to go through all provided solutions again.

What doesn't work:

  • devenv /updateconfiguration & devenv /clearcache
  • Steps described here
  • Deleting %localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache

What does work:

  • Re-installing packages\JavaScript_LanguageService\JavaScript_LanguageService.msi and running devenv /Setup and devenv /ResetSkipPkgs afterwards

Again, those seem to be only temporary fixes. It works, I can create project files and classes and what not within VS, then suddenly the error appears again. One time I managed to completely resolve it, only to have it returned with the next TypeScript update.

@mbraude

This comment has been minimized.

Copy link

@mbraude mbraude commented Oct 30, 2015

Hi @artganify. I'm sorry for your trouble. Unfortunately the steps you're following on stack overflow are wrong. They will fix the problem, but only temporality. The next time you do any setup action, such as installing a typescript update, it will revert the fix.

Please follow the steps I outlined above three months ago. They will fix the problem permanently.

@MayMih

This comment has been minimized.

Copy link

@MayMih MayMih commented Dec 8, 2015

cmd switches for devenv.exe helps with the same problem on VS 2013 update 5 too. Thanks.
Nope, actually it helps just partially - Now there is no more warning message about JavaScript, but when I try to run project it crashes with Error like: "Exception raised. Probably caused by Extension".
And when I try to close IDE (even if I didn't open any project) it shows me Error like: "Can't load file or assembly VSPerfReader or one of it's dependencies. There is no assembly manifest in module."

Finally the only thing that helped me is uninstalling of Visual Studio 2013 SDK.

@dime2lo

This comment has been minimized.

Copy link

@dime2lo dime2lo commented Dec 12, 2015

Followed the devenv /updateconfiguration & devenv /clearcache steps and it solved the issue for me. Thanks!

@daviatorstorm

This comment has been minimized.

Copy link

@daviatorstorm daviatorstorm commented Jan 18, 2016

What is the exect problem with VS 2015 at all? Maybe if we can understand the main problem then we can understand how to solve it for all. And describe a problem for VS developer to create a update package that solves this problem.

@mhegazy

This comment has been minimized.

Copy link

@mhegazy mhegazy commented Jan 19, 2016

@daviatorstorm, the issue was caused by multiple updated overwriting the JS package. it is not related ot the TypeScript update, it just happened around the time the TS update was released.
The steps outlined in #4238 (comment) should get you back to a working state.

@daviatorstorm

This comment has been minimized.

Copy link

@daviatorstorm daviatorstorm commented Jan 25, 2016

I've discover a thing that if in referenced files in _references.js are errors - intellisense won't work.
By looking to (in my case) angular.js file, i found alot of errors. I`ve reinstalled a package and problem is gone. But i have the next issue.
Intellisense cannot found local fields from local file.
image

@mhegazy

This comment has been minimized.

Copy link

@mhegazy mhegazy commented Jan 25, 2016

@daviatorstorm this has nothing to do with the OP. your JS intellesises seems to be loaded just fine. please file a different issue for the JS intellisense at https://visualstudio.uservoice.com/forums/121579-visual-studio-2015

@lucavgobbi

This comment has been minimized.

Copy link

@lucavgobbi lucavgobbi commented Oct 12, 2016

@mbraude suggestion worked for me on 1.8.11

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.