Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extension fails to load with error System.IO.FileNotFoundException

See original GitHub issue

Started recently - not sure whether it started as result of extension upgrade or something else but it was working for me until recently.

getting the same problem after I tried to uninstall re-install the extension.


  • Git Diff Margin version: 3.11.5
  • Visual Studio version: Microsoft Visual Studio Professional 2019 Version 16.9.2

What happened

Few seconds after VS loads with a solution, error bar appears with this message and the extension is not working: An exception of type FileNotFoundException has been encountered. This may be caused by an extension. Open log file

Looking at the log, I find this:

    <time>2021/07/07 15:38:30.382</time>
    <source>Editor or Editor Extension</source>
    <description>System.IO.FileNotFoundException: Could not load file or assembly &apos;GitDiffMargin.Impl, Version=, Culture=neutral, PublicKeyToken=72dfb55bb9fc8a25&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;File name: &apos;GitDiffMargin.Impl, Version=, Culture=neutral, PublicKeyToken=72dfb55bb9fc8a25&apos;&#x000D;&#x000A;   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)&#x000D;&#x000A;   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)&#x000D;&#x000A;   at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark&amp; stackMark)&#x000D;&#x000A;   at System.Type.GetType(String typeName, Boolean throwOnError)&#x000D;&#x000A;   at Microsoft.VisualStudio.Editor.Implementation.CommandHandlerServiceAdapter.&lt;&gt;c__DisplayClass34_0.&lt;FindCustomArgsType&gt;b__0()&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint[T](Object errorSource, Func`1 call, T valueOnThrow)&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)&#x000D;&#x000A;&#x000D;&#x000A;WRN: Assembly binding logging is turned OFF.&#x000D;&#x000A;To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.&#x000D;&#x000A;Note: There is some performance penalty associated with assembly bind failure logging.&#x000D;&#x000A;To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].&#x000D;&#x000A;</description>

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:4
  • Comments:6

github_iconTop GitHub Comments

misterorlovcommented, Sep 8, 2021

After many months of suffering, I realized that I could manually install the previous version. v3.10.2 works well now! (It’s a bit tricky to make the studio to not update the extension right away. If it is updated, then you need to uncheck the “Automatically update” checkbox, then uninstall and install again from the .vsix file, then start VS and quickly uncheck the “Automatically update” checkbox and close VS)

gedricommented, Sep 8, 2021

Thanks @misterorlov & @ChuckM2 - that really helped me. Just noticed that strangely, after installing 3.10.4, it shows in the Manage Extensions as, but the ‘Release Notes’ link goes to the 3.10.4 page… Anyway, it now works correctly, so doesn’t matter what version it thinks it is 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

System.IO.FileNotFoundException: 'Could not load file or ...
I have an application in .net core. the application was running fine, but the error started coming after I installed.
Read more >
Visual Studio installer / extension install can't run (errors)
Can't install any Visual Studio extensions, I seem to get the same error for any extension I try to install or update. Could...
Read more >
Debugging System.IO.FileNotFoundException - Cause and fix
The typical cause of this error is that the referenced assembly isn't on the file system. There can be multiple causes of this....
Read more >
Load Error with extension - Developer Community
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.ExtensionManager, Version=, Culture=neutral, ...
Read more >
An unhandled exception of type 'System.IO. ...
I'm getting this error message when hitting F5 to debug projects: “An unhandled exception of type 'System.IO.FileNotFoundException' occurred ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found