Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exception with Resolving assemblies: Attempt to load an unverifiable executable with fixups

Tags:

I'm embedding required assemblies to my project and resolving them on runtime with AppDomain.CurrentDomain.AssemblyResolve event.

All works okay except irrKlang's .net4-wrapper, which throws an exception if i try so;

System.IO.FileLoadException: Attempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.) (Exception from HRESULT: 0x80131019)
   at System.Reflection.RuntimeAssembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection, SecurityContextSource securityContextSource)
   at System.Reflection.Assembly.Load(Byte[] rawAssembly)
   at xyz.Utility.Helpers.AssemblyManager.Resolver(Object sender, ResolveEventArgs args) in C:\Users\shalafi\Desktop\xyz\trunk\xyz\Utility\Helpers\AssemblyManager.cs:line 55
   at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)

Basicly i suspect of CLR not being able to load mixed mode assemblies with Assembly.Load(byte[]) though i'm not sure.

I was not able to find anything related to the exception message;

Attempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.)

Help appreciated.

like image 526
HuseyinUslu Avatar asked Feb 15 '11 15:02

HuseyinUslu


1 Answers

EDIT : The references i posted are not valid anymore, because of outdated external links. Please refer here. How do I dynamically load raw assemblies that contains unmanaged code?(bypassing 'Unverifiable code failed policy check' exception)

like image 131
Soundararajan Avatar answered Sep 21 '22 12:09

Soundararajan