No intellisense in Razor Views - ArgumentException 'RazorSupportedRuntimeVersion' already added to dictionary - by JJoeDouglas

Status : 

  Duplicate<br /><br />
		This item appears to be a duplicate of another existing Connect or internal item.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


23
0
Sign in
to vote
ID 1572978 Comments
Status Closed Workarounds
Type Bug Repros 16
Opened 7/21/2015 6:00:05 AM
Access Restriction Public

Description

This happens with every extension that I can disable, disabled.

Stack trace from activitylog.xml:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Item has already been added. Key in dictionary: 'RazorSupportedRuntimeVersion' Key being added: 'RazorSupportedRuntimeVersion'
 at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
 at System.Collections.Hashtable.Add(Object key, Object value)
 at System.Collections.Specialized.HybridDictionary.Add(Object key, Object value)
 at Microsoft.VisualStudio.Utilities.PropertyCollection.AddProperty(Object key, Object property)
 at Microsoft.VisualStudio.Html.Package.Razor.RazorVersionDetector.Microsoft.Html.Editor.ContainedLanguage.Razor.Def.IRazorVersionDetector.GetVersion(ITextBuffer textBuffer)
 at Microsoft.Html.Editor.ContainedLanguage.Razor.RazorUtility.TryGetRazorVersion(ITextBuffer textBuffer, Version& razorVersion)
 at Microsoft.Html.Editor.ContainedLanguage.Razor.RazorErrorTagger..ctor(ITextBuffer textBuffer)
 --- End of inner exception stack trace ---
 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
 at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
 at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
 at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
 at System.Activator.CreateInstance(Type type, Object[] args)
 at Microsoft.Html.Editor.ContainedLanguage.Common.ContainedCodeErrorTaggerProvider`1.CreateTagger[T](ITextBuffer textBuffer)
 at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)
Sign in to post a comment.
Posted by JP Hellemons on 9/1/2015 at 3:31 AM
I have this error:
<entry>
    <record>663</record>
    <time>2015/09/01 10:00:13.488</time>
    <type>Error</type>
    <source>Color Theme Service</source>
    <description>The color 'Popup' in category 'de7b1121-99a4-4708-aedf-15f40c9b332f' does not exist.</description>
</entry>
and this error:
<entry>
    <record>673</record>
    <time>2015/09/01 10:01:27.303</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Item has already been added. Key in dictionary: 'RazorSupportedRuntimeVersion' Key being added: 'RazorSupportedRuntimeVersion'
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at System.Collections.Specialized.HybridDictionary.Add(Object key, Object value)
at Microsoft.VisualStudio.Utilities.PropertyCollection.AddProperty(Object key, Object property)
at Microsoft.VisualStudio.Html.Package.Razor.RazorVersionDetector.Microsoft.Html.Editor.ContainedLanguage.Razor.Def.IRazorVersionDetector.GetVersion(ITextBuffer textBuffer)
at Microsoft.Html.Editor.ContainedLanguage.Razor.RazorUtility.TryGetRazorVersion(ITextBuffer textBuffer, Version& razorVersion)
at Microsoft.Html.Editor.ContainedLanguage.Razor.RazorErrorTagger..ctor(ITextBuffer textBuffer)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at Microsoft.Html.Editor.ContainedLanguage.Common.ContainedCodeErrorTaggerProvider`1.CreateTagger[T](ITextBuffer textBuffer)
at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)</description>
</entry>

I have seen that a reset userdata is a temp workaround. But I do not want to re-install all addons. I just like to disable the one that causes this.
Posted by JStemper2 on 8/25/2015 at 6:03 AM
Same problem here.
Posted by Eduardo Bezerra Ramires on 8/24/2015 at 1:39 PM
I have the same problem, can anyone please fix this? :(

The only 2015 i have instaled is the RTM, i haven't been using the RC in this machine.

I have the 2008 installed tough, but i guess it's too old to have anything to do with this.
Posted by neilhuiz on 8/12/2015 at 12:50 PM
I'm also seeing a repro on a machine that upgraded from VS 2015 RC to RTM.
Posted by DWoodside on 7/23/2015 at 2:45 PM
This occurs even on brand new MVC sites. Additionally, it only started occurring after uninstalled the VS 2015 RC and installed RTM.
Posted by Microsoft on 7/21/2015 at 6:08 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If you require immediate assistance with this issue, please contact product support at http://support.microsoft.com/oas/default.aspx.