How to fix stdole error with Visual Studio opening web pages

So I’ve hit an error the first time I open up a *html file in Visual Studio. You’ll see the following message if you’re in the same boat as me:

An exception has been encountered. This may be caused by an extension.

You can get more information by examining the file ‘C:\Users\<USERNAME>\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml’.

vs_dialog

You’ll see this line in the ActivityLog.xml:

System.IO.FileNotFoundException: Could not load file or assembly ‘stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified. File name: ‘stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ at Microsoft.VisualStudio.JavaScript.Web.Extensions.Interop.HTMLEditor.HTMLTreeHelperFactory.Create(ITextBuffer buffer) at Microsoft.VisualStudio.JavaScript.Web.Extensions.Interop.HTMLEditor.HTMLTreeHelperFactory.<>c__DisplayClass0_0.<GetOrCreate>b__0() at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func`1 creator) at Microsoft.VisualStudio.JavaScript.Web.Extensions.Interop.HTMLEditor.HTMLTreeHelperFactory.GetOrCreate(ITextBuffer buffer) at Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTagger..ctor(ITextView view, ITextBuffer sourceBuffer, ISPASupportedTagProvider tagNameProver) at Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.<>c__DisplayClass2_0`1.<CreateTagger>b__0() at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func`1 creator) at Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.CreateTagger[T](ITextView textView, ITextBuffer buffer) at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

The emphasis on stdole is mine. You’ll probably go digging around for actual solutions. You’ll probably find the following when trying to dig up a solution:

Issue with TypeScript – Uninstall/Reinstall Tools and Windows SDK, then clear VS cache

as well as a few other solutions that I can’t seem to find in my history. No solution worked so far. Thankfully, I fixed it with the simplest solution (but not the best):

c:\>dir /s stdole.dll

I copied the one from here:

Directory of c:\Program Files (x86)\Microsoft.NET\Primary Interop Assemblies

07/07/2015 12:51 AM 32,416 stdole.dll
1 File(s) 32,416 bytes

to the folder where devenv.exe resides (usually C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE). I’m going to make a forum post later to get a non-hacky solution to the issue, but for now, this is what worked for me.