TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

Lost JavaScript support in VS2015 RTM after updating to TypeScript 1.5.4

Open mwinkler opened this issue 11 years ago • 33 comments

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 avatar Aug 08 '15 12:08 mwinkler

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

SetSite failed for package [JavaScriptWebExtensionsPackage]

jonstelly avatar Aug 08 '15 15:08 jonstelly

Does the IntelliSense work in a stand alone javascript file?

paulvanbrenk avatar Aug 08 '15 21:08 paulvanbrenk

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.

mbraude avatar Aug 08 '15 22:08 mbraude

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

sguryev avatar Aug 08 '15 23:08 sguryev

Yep, that's it.

mbraude avatar Aug 08 '15 23:08 mbraude

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)

sguryev avatar Aug 08 '15 23:08 sguryev

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)

mwinkler avatar Aug 09 '15 11:08 mwinkler

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.

mbraude avatar Aug 09 '15 19:08 mbraude

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

mwinkler avatar Aug 09 '15 20:08 mwinkler

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

Thanks.

jaliyaudagedara avatar Aug 10 '15 18:08 jaliyaudagedara

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.

jonstelly avatar Aug 10 '15 19:08 jonstelly

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

jamesxv7 avatar Aug 11 '15 16:08 jamesxv7

@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. :smile:

DanielRosenwasser avatar Aug 11 '15 20:08 DanielRosenwasser

Faced this issue and fixed now.. Thanks.

asiridissa avatar Aug 25 '15 07:08 asiridissa

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

maiorfi avatar Sep 07 '15 12:09 maiorfi

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

jerriep avatar Sep 08 '15 13:09 jerriep

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()

migajek avatar Sep 11 '15 11:09 migajek

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

mbraude avatar Sep 11 '15 16:09 mbraude

@mbraude ok I've created https://github.com/Microsoft/TypeScript/issues/4752 thank you!

migajek avatar Sep 11 '15 17:09 migajek

@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.

timothyleerussell avatar Sep 20 '15 04:09 timothyleerussell