VS2015 Component Cache Woes and HtmlToolHost Error / Assembly timestamp Error

Viewed 917

VS2015 is currently a pain to be working with. I have two solutions in particular that just completely misbehave and I've tried all the solutions I can find. Both these solutions are MVC4 based applications and APIs.

I've even resorted to installing a VSIX extension that clears the MEF Cache and restarts Visual Studio for me as it causes that many issues and interruptions to my daily workflow.

One solution is behaving very strangely in that the first launch after a machine reboot when I start editing a file VS freezes, then crashes and goes through a restart process, then I can edit without issue for the rest of the day.

Another solution every time I try to open a cshtml file after first boot it says "Object not set to an instance of an object" and I cannot even open it. If I clear the cache (using the extension) restart, its fine.

Other times a restart leaves Intellisense not working forcing another restart which usually fixes that issue.

What is it with the cache? It seems extremely buggy. When starting one of these solutions I get another error about Diagnostics which creates this error in my ActivityLog.xml which I can't find any info about and suspect is the root of these other issues:

  <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>

The cache keeps saying its out of date but with the above mentioned issue it's being rebuilt multiple times a day at the moment and still appears to be out of date. Unless this error is preventing a correct rebuild.

I also have the error in my ActivityLog which occurs immediately before the HtmlToolHost error:

  <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>

Has anyone encountered these and have a solution that works? Most solutions you find simply tell you to delete the ComponentModelCache directory here:

Local\Microsoft\VisualStudio\14.0\ComponentModelCache

Which is what the extension I mentioned does. I guess the fact that someone has written an extension is a clue to how much of a wide-spread problem this is. But there must be a proper solution!

In my component cache location I also see these error messages:

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.
0 Answers
Related