I have built the IL Rewriter for some custom requirement. All it does is
Everything works fine with sample Windows form application. However, for the web application, epilogue & prologue are getting injected properly. But, when it gets called, it throws below error -
System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)
Somehow, the newly built .Net DLL is not getting loaded for WebApp, while the same is working fine for Windows App.
If I disable IL Rewrite, everything works fine as expected. That means IL Rewrite is causing the error.
Any solution would be much appreciated
I could resolve the issue by setting environment variable
COMPLUS_LoaderOptimization
to
1
User contributions licensed under CC BY-SA 3.0