VS2015组件缓存失败和HtmlToolHost错误/程序集时间戳错误

Jam*_*mer 6 caching visual-studio asp.net-mvc-4 visual-studio-2015

VS2015目前很难与之合作.我有两个解决方案,特别是完全行为不端,我已经尝试了所有可以找到的解决方案.这两种解决方案都是基于MVC4的应用程序和API.

我甚至使用安装VSIX扩展来清除MEF缓存并为我重新启动Visual Studio,因为它会导致我的日常工作流程出现许多问题和中断.

一个解决方案的行为非常奇怪,因为当我开始编辑文件VS冻结,然后崩溃并经历重启过程后,机器重新启动后的第一次启动,然后我可以在当天余下的时间内编辑而不会出现问题.

每次我尝试在第一次启动后打开一个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>
Run Code Online (Sandbox Code Playgroud)

缓存一直在说它已经过时了但是由于上面提到的问题,它现在每天都要重建多次,但似乎仍然过时了.除非此错误阻止正确重建.

我的ActivityLog中也出现错误,该错误发生在HtmlToolHost错误之前:

  <entry>
    <record>639</record>
    <time>2016/03/04 09:47:00.008</time>
    <type>Error</type>
    <source>Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost</source>
    <description>Assembly timestamp in MEF Cache does not match loaded assembly timestamp;VS.Platform.ExtensibilityHosting.MefCacheInvalidation.Description=Assembly timestamp in MEF Cache does not match loaded assembly timestamp;VS.Platform.ExtensibilityHosting.MefCacheInvalidation.CachedAssembly.Name=Microsoft.VisualStudio.WebClient.Diagnostics.Services, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;VS.Platform.ExtensibilityHosting.MefCacheInvalidation.CachedAssembly.Path=C:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio%2014.0/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.WebClient.Diagnostics.Services.DLL;VS.Platform.ExtensibilityHosting.MefCacheInvalidation.CachedAssembly.Timestamp=19/11/2015 21:31:16;VS.Platform.ExtensibilityHosting.MefCacheInvalidation.LoadedAssembly.Name=Microsoft.VisualStudio.WebClient.Diagnostics.Services, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;VS.Platform.ExtensibilityHosting.MefCacheInvalidation.LoadedAssembly.Path=C:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio%2014.0/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.WebClient.Diagnostics.Services.DLL;VS.Platform.ExtensibilityHosting.MefCacheInvalidation.LoadedAssembly.Timestamp=02/03/2016 20:15:09&#x000D;&#x000A;</description>
  </entry>
Run Code Online (Sandbox Code Playgroud)

有没有人遇到这些并有一个有效的解决方案?您找到的大多数解决方案只是告诉您删除ComponentModelCache目录:

Local\Microsoft\VisualStudio\14.0\ComponentModelCache
Run Code Online (Sandbox Code Playgroud)

这就是我提到的扩展名.我想有人写了一个扩展的事实是一个广泛的问题是多少的线索.但必须有一个适当的解决方案!

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

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.
Run Code Online (Sandbox Code Playgroud)