当我尝试键入一些代码时,我的Visual Studio 2015更新3突然崩溃了。它一直工作到周五。周末发生了一些事情。我的解决方案中有5个项目(4个类库和1个Web项目)。只有当我尝试在Data
项目的代码编辑器中输入类型库时,VS才会崩溃。我使用的是EF Code First,但我不认为这个问题与代码有关。这可能与其他事情有关。
我调查了Activity.log
,发现这是由于某些损坏的ComponentCache
。我清除了ComponentModelCache
,但问题仍然存在。
任何建议都是值得欣赏的。下面粘贴了Activity.log
条目供您参考。我相信你们中的许多人一定经历过这个问题。
<entry>
<record>633</record>
<time>2016/07/04 13:55:53.621</time>
<type>Error</type>
<source>Editor or Editor Extension</source>
<description>Microsoft.VisualStudio.ExtensibilityHosting.InvalidMEFCacheException: The Visual Studio component cache is out of date. Please restart Visual Studio.
 at Microsoft.VisualStudio.ExtensibilityHosting.FaultCatchingAssemblyLoader.<LoadAssembly>b__15_0(AssemblyName assemblyNameParam)
 at Microsoft.VisualStudio.ExtensibilityHosting.Utilities.SafeGetOrAdd[TKey,TValue](IDictionary`2 dictionary, TKey key, Object lockObj, Func`2 valueFactory)
 at Microsoft.VisualStudio.ExtensibilityHosting.FaultCatchingAssemblyLoader.LoadAssembly(AssemblyName assemblyName)
 at Microsoft.VisualStudio.Composition.Reflection.ResolverExtensions.Resolve(ConstructorRef constructorRef)
 at Microsoft.VisualStudio.Composition.RuntimeComposition.RuntimePart.get_ImportingConstructor()
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create()
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
 at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
--- End of stack trace from previous location where exception was thrown ---
 at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
 at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_0`1.<As>b__0()
 at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Lazy`1.get_Value()
 at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)</description>
</entry>