Visual studio VS2015组件缓存问题和HtmlToolHost错误/程序集时间戳错误

Visual studio VS2015组件缓存问题和HtmlToolHost错误/程序集时间戳错误,visual-studio,asp.net-mvc-4,caching,visual-studio-2015,Visual Studio,Asp.net Mvc 4,Caching,Visual Studio 2015,VS2015目前是一个需要解决的难题。我有两个特别的解决方案,完全是行为不端,我已经尝试了所有我能找到的解决方案。这两种解决方案都是基于MVC4的应用程序和API 我甚至还安装了一个可以清除MEF缓存并为我重新启动Visual Studio的程序,因为它会给我的日常工作流程带来很多问题和中断 一种解决方案表现得非常奇怪,当我开始编辑一个文件时,机器重新启动后的第一次启动与冻结,然后崩溃并经历一个重新启动过程,然后我可以在一天剩下的时间内无问题地编辑 另一种解决方案是,每次我尝试在首次启动后打开c

VS2015目前是一个需要解决的难题。我有两个特别的解决方案,完全是行为不端,我已经尝试了所有我能找到的解决方案。这两种解决方案都是基于MVC4的应用程序和API

我甚至还安装了一个可以清除MEF缓存并为我重新启动Visual Studio的程序,因为它会给我的日常工作流程带来很多问题和中断

一种解决方案表现得非常奇怪,当我开始编辑一个文件时,机器重新启动后的第一次启动与冻结,然后崩溃并经历一个重新启动过程,然后我可以在一天剩下的时间内无问题地编辑

另一种解决方案是,每次我尝试在首次启动后打开cshtml文件时,它会显示“对象未设置为对象的实例”,我甚至无法打开它。如果我清除缓存(使用扩展)重新启动,就可以了

其他情况下,重新启动会导致Intellisense无法工作,强制重新启动通常会解决该问题

缓存是怎么回事?这辆车看起来非常笨重。启动其中一个解决方案时,我遇到另一个诊断错误,该错误在我的
ActivityLog.xml
中创建了此错误,我找不到有关此错误的任何信息,并怀疑是这些其他问题的根源:

  <entry>
    <record>641</record>
    <time>2016/03/04 09:47:00.014</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.HtmlToolHostPackage, Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]</description>
    <guid>{B66F381B-48DE-4C10-B71B-EF9A2A808D85}</guid>
    <hr>80131500</hr>
    <errorinfo>The Visual Studio component cache is out of date. Please restart Visual Studio. The Visual Studio component cache is out of date. Please restart Visual Studio.</errorinfo>
  </entry>
这就是我提到的扩展所做的。我想,有人编写了一个扩展的事实是一个线索,说明这是一个多么广泛的问题。但必须有一个适当的解决办法

在我的组件缓存位置中,我还看到以下错误消息:

Microsoft.VisualStudio.Composition.PartDiscoveryException: Unable to load assembly "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\Microsoft.CodeAnalysis.VisualBasic.InteractiveEditorFeatures.dll" for scanning. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CodeAnalysis.VisualBasic.InteractiveEditorFeatures.dll' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

Microsoft.VisualStudio.Composition.PartDiscoveryException: Unable to load assembly "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.VisualBasic.Repl.dll" for scanning. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.VisualBasic.Repl.dll' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

Microsoft.VisualStudio.Composition.PartDiscoveryException: Failure while scanning type "Microsoft.VisualStudio.Azure.ConnectedServices.MobileServices.Handlers.CordovaMobileServiceHandler". ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.ApacheCordovaTools.Definitions.14.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

关于组件缓存,我也有同样的问题,特别是当我尝试更新数据库(EF迁移)时。这很烦人。扩展名是什么?您指的是哪个扩展名?清除MEF缓存的扩展名我已更新问题以包含链接。@jao您是否有与我上面详述的相同的包错误消息?如果是这样的话,我认为我们可以通过确定这些组件是由哪个软件包安装的并再次安装这些组件来解决这个问题。
Local\Microsoft\VisualStudio\14.0\ComponentModelCache
Microsoft.VisualStudio.Composition.PartDiscoveryException: Unable to load assembly "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\Microsoft.CodeAnalysis.VisualBasic.InteractiveEditorFeatures.dll" for scanning. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CodeAnalysis.VisualBasic.InteractiveEditorFeatures.dll' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

Microsoft.VisualStudio.Composition.PartDiscoveryException: Unable to load assembly "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.VisualBasic.Repl.dll" for scanning. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.VisualBasic.Repl.dll' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

Microsoft.VisualStudio.Composition.PartDiscoveryException: Failure while scanning type "Microsoft.VisualStudio.Azure.ConnectedServices.MobileServices.Handlers.CordovaMobileServiceHandler". ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.ApacheCordovaTools.Definitions.14.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.