kzu / InjectModuleInitializer

Console program and nuget package to inject a module initializer method into a built .NET assembly
http://einaregilsson.com/module-initializers-in-csharp/
MIT License
97 stars 32 forks source link

Injected code not called #9

Open ghost opened 8 years ago

ghost commented 8 years ago

Hi Einar, I have a situation where the injected code is not called when the DLL is loaded with Assembly.LoadFile or LoadFrom. This is a problem as the Visual Studio Designer seems to use these when loading my control in design mode. So a form containing my control sometimes fails to show correctly. Any ideas? Regards, -Thomas

einaregilsson commented 8 years ago

Sorry, no, I don't really have any ideas. The designer in Visual Studio does some strange things, maybe it does some special magic with the assembly loading. I don't even have Visual Studio anymore, so it's unlikely that this issue will be fixed by me, but of course anyone is free to step in and try to figure out what the problem is.