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

Error in Visual Studio 2015 Update 1 CTP #530

Closed
delie opened this issue Oct 13, 2015 · 5 comments
Closed

Error in Visual Studio 2015 Update 1 CTP #530

delie opened this issue Oct 13, 2015 · 5 comments

Comments

@delie
Copy link

delie commented Oct 13, 2015

Apologies for flagging this if you're not testing in the 2015 Update 1 CTP yet, but I'm getting an error upon opening a Jade file in the editor.

It seems to be complaining that "contentTypes" is not a key. Occurs in the constructor for Microsoft.NodejsTools.ClassifierProviderMetadata

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Immutable.ImmutableDictionary2.get_Item(TKey key)&#x000D;&#x000A; at System.Collections.Immutable.ImmutableDictionary2.System.Collections.Generic.IDictionary<TKey,TValue>.get_Item(TKey key) at Microsoft.NodejsTools.ClassifierProviderMetadata..ctor(IDictionary2 values)&#x000D;&#x000A; --- End of inner exception stack trace ---&#x000D;&#x000A; at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)&#x000D;&#x000A; at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)&#x000D;&#x000A; at Microsoft.VisualStudio.Composition.MetadataViewClassProvider.CreateProxy(IReadOnlyDictionary2 metadata, IReadOnlyDictionary2 defaultValues, Type metadataViewType)&#x000D;&#x000A; at Microsoft.VisualStudio.Composition.ExportProvider.GetStrongTypedMetadata(IReadOnlyDictionary2 metadata, Type metadataType) at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import, RuntimeExport export, Func3 lazyFactory)&#x000D;&#x000A; at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)&#x000D;&#x000A; at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.&lt;CreateValue&gt;b__10_0(RuntimeImport import)&#x000D;&#x000A; at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)&#x000D;&#x000A; at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue()&#x000D;&#x000A; at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create()&#x000D;&#x000A; at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)&#x000D;&#x000A; at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)&#x000D;&#x000A; at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()&#x000D;&#x000A; at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.&lt;&gt;c__DisplayClass15_0.&lt;GetExportedValueHelper&gt;b__0()&#x000D;&#x000A; at Microsoft.VisualStudio.Composition.DelegateServices.&lt;&gt;c__DisplayClass2_01.<As>b__0() at System.Lazy1.CreateValue()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A; at System.Lazy1.get_Value() at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeMatchingFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable1 lazyFactories, Func2 getter, IContentType dataContentType, Object errorSource)

@delie delie changed the title Error in Visual Studio 2015 CTP Error in Visual Studio 2015 Update 1 CTP Oct 13, 2015
@mousetraps
Copy link
Contributor

We'll try to investigate this before our next release

Just so I understand the problem better... does it occur with every jade file? Or only when there is specific text in the editor?

@mousetraps mousetraps modified the milestone: October Oct 21, 2015
@delie
Copy link
Author

delie commented Oct 21, 2015

Hmm, good question. Unfortunately, since my original post I tried to uninstall/reinstall the NodeJS tools, but it seems I can no longer install at all. I'm using Visual Studio Community 2015, version 14.024606.01 Update 1 CTP.

I've tried installing NTVS 1.1 RC2.1 VS 2015, and NTVS.Dev.2015-10-20.VS.2015, but both of them are coming up with a "Visual Studio 2015 is required" error.

I only upgraded to the Update 1 CTP, because I wasn't able to save my tab settings in the text editor for Jade files, but looks like it made matters worse :)

I think I originally installed the Node JS tools on top of the non Update-1 version of VS Community 2015. I then updated VS Community 2015 to VS Community 2015 Update 1 CTP, and that's when I started getting the Jade error in Node JS tools. I think it happened with any Jade file, but can't re-test it at the present time given my dev environment is now different to how it was originally.

@delie
Copy link
Author

delie commented Oct 21, 2015

If there's any other tests I can do in VS2015 Update 1 CTP let me know and I'll be happy to help

@mousetraps
Copy link
Contributor

@billti fyi looks like this issue is still occurring in the latest vs update bits.

@billti
Copy link
Member

billti commented Oct 28, 2015

I just installed the VS2015 Update1 RC and the latest NTVS build, and got this issue also. Deleting the MEF cache and running devenv /setup to recalculate didn't resolve it. The MEF error log only contains events unrelated components.

Not sure what is causing this to happen now... but we'll need to get it resolved before we ship 1.1 :-( Investigating...

billti added a commit that referenced this issue Oct 29, 2015
billti added a commit that referenced this issue Oct 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants