Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This could be caused by any number of things, MSDN has it said as:</p> <blockquote> <p>TypeLoadException is thrown when the common language runtime cannot find the assembly, the type within the assembly, or cannot load the type.</p> </blockquote> <p>So it's clear that a type can't be found, either the assembly is missing, the type is missing or there's a clash between runtime configurations.</p> <p>Sometimes the issue can arise because the assembly you're referencing is a different platform type (32bit / 64bit etc) than the one you're consuming from.</p> <p>I would recommend catching the exception and examining it in more detail to identify what it's having trouble with.</p> <hr> <p><strong>Further to my previous information</strong></p> <p>Sometimes I've seen this issue arise because (for one reason or another) a referenced assembly can't actually be resolved, even though it's referenced and loaded.</p> <p>I typically see this when AppDomain boundaries are involved.</p> <p>One way I've found that sometimes resolves the issue (but only if the assembly is already in the AppDomain) is this little code snippet:</p> <pre><code>AppDomain.CurrentDomain.AsemblyResolve += (s, e) =&gt; { return AppDomain.CurrentDomain.GetAssemblies() .SingleOrDefault(asm =&gt; asm.FullName == e.Name); } </code></pre> <p>Like I said, I see this issue when AppDomains get involved and this does seem to solve it when the assembly is indeed already referenced and loaded. I've no idea why the framework fails to resolve the reference itself.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload