我得到這個誤差%APPDATA%\微軟\ VisualStudio的\ 14.0 \ ActivityLog.xml:
<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)

我跑了C:\ 「程序文件(x86)」 \ 「微軟的Visual Studio 14.0」 \ Common7 \ IDE \ devenv.exe的/ resetuserdata並且它已修復。
從Exception when opening a cshtml file
重新打開項目可解決您的問題。 –
我已經嘗試重新打開和卸載和加載項目,但仍然即時獲得該錯誤 –