VS2015 Component Cache Woes and HtmlToolHost Error / Assembly timestamp Error - visual-studio

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

Related

Could not load file or assembly “Oracle.DataAccess” or one of its dependencies

I am trying to run this desktop application with oracle database. I keep getting this error
"Additional information: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, or one of its dependencies. An attempt was made to load a program with an incorrect format".
How can I solve this problem?
FYI: I made the desktop application using .NET with Visual Studio 2015 and an Oracle database.

Visual Studio error when opening cs|html files

When opening a Cshtml or an html file i get 2 errors messages:
Microsoft Visual Studio
An exception has been encountered. This may be caused by an extension.
You can get more information by examining the file
'C:\Users***\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml'.
Log as JsFiddle (to preserve readability):
https://jsfiddle.net/gze67y0u/
the interesting part of the log might be this line:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Web.Editor, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies
I tried to google the dll and where it belongs to but had no success.
The other message is may just a side effect of the missing dll:
Microsoft Visual Studio
The Visual Studio language support for Style has not been installed.
Code-editing IntelliSense will not be available. Markup IntelliSense
for server controls may not work.
I tried to reset the settings, i tried to repair also an complete reinstall.
What component am i missing?

Can't load EntityFramework.dll 5.0.0.0 inside Visual Studio 2013 extension

I'm writing a Visual Studio extension which depends on EntityFramework 5.0.0.0. I included EntityFramework in my project. When I install my extension, my extension's DLL appears in VS extensions folder, and EntityFramework.dll appears with it as well.
However, when I run my Extension in Visual Studio 2013 (update 5), it can't load EntityFramework: System.IO.FileNotFoundException: Could not load file or assembly 'EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
Looking in Process Monitor, I saw that when I run my extension, VS2013 tries to load EntityFramework from a different path, which has it in a different version - 4.2. I'd expect VS2013 to continue to search for EntityFramework, and find it in my extension's folder, like it does for other dlls included in my extension, but it doesn't.
In VS2015, VS does manage to load EntityFramework 5.0.0.0, but it does so also from yet another different path.
Why doesn't VS2013 continue to search for EntityFramework in my extension's folder?
You need to specify a ProvideCodeBase attribute to specify that your extra assemblies should be loaded. "Sometimes" you get lucky and it finds something else, but that's never guaranteed to work. You can see a few examples of that being used here.

'access is denied' error when using VS 2010, VSTO, Excel 2007 for customized ribbon

I'm trying to get a simple ribbon add-in build using VS 2010 and Excel 2007 utilizing VSTO. I've tried both an Excel Worksheet and Excel Add-in with the same results when I launch Excel (listed below).
I have a larger prototype I'm trying to build, but for now I can't get off the ground with customizing the Excel ribbon. Has anyone had any luck with building a simple prototype using VS 2010 and Excel 2007? Did you encounter any Access denied issues when attempting to load in your add-in dll? Let me stress there is nothing fancy here .. just 2 buttons that don't even do anything at this point (excel doesn't even load the dll, so there's no breakpoints, etc).
I have tried using the 'caspol.exe' tool to grant full trust to my dll, this changed nothing. I've made sure the folder where the dll is built to has 'Everyone' privileges. I've tried publishing and installing the add-in, I've also tried just starting it directly from the debugger in VS 2010, same issue over and over again. I am admin on the server.
Thank you.
Jim
Could not load file or assembly 'MyRibbonAddIn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied.
***** Exception Text *******
System.IO.FileLoadException: Could not load file or assembly 'MyRibbonAddIn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied.
File name: 'MyRibbonAddIn, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' ---> System.IO.FileLoadException: Could not load file or assembly 'MyRibbonAddIn, Version=1.0.0.0, Culture=neutral' or one of its dependencies. Access is denied.
File name: 'MyRibbonAddIn, Version=1.0.0.0, Culture=neutral'
ARGH! It was our virus scanner. I disabled it and things showed up. So many hours wasted. Hopefully this question helps someone else avoid losing time in their life on something stupid

visual studio project gives error after rebuilding

I am able to open a saved copy of my project in visual studio and it runs fine. After I rebuild the project it gives me the following error :
Could not load file or assembly 'System.Web.Ajax, Version=3.0.31106.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The system cannot find the file specified.
this is driving me crazy. please help
Use Fuslogvw.exe to troubleshoot this problem. It shows you where the CLR looked for the assembly.

Resources