L
lithel
I am writing an application that uses a set of library assembly dlls
that are located in a command line passed location. Originally, I
tried to solve this problem by creating an AssemblyResolve handler and
registering it very early in hte main function.
The problem is that the application actually uses some of these
assemblies. In particular, one of the classes (named MainWindow)
derives from a class in the library. If the runtime attempts to create
a MainWindow before the handler is loaded, then I have a problem.
Fair enough. However, the way I understand the JIT, I thought it would
not attempt to load dependent libraries until the class is used or a
static call is made on that class. I made a seperate "Launcher" class
that the main funciton and the handler, but I am still failing to
resolve the assembly before I even reach my main function.
I am reasonably certain that if I wrote an entire launcher assembly
then this method would work, but I'm hoping there's a "cleaner" way to
fix this problem. Has anyone ever run into this problem?
that are located in a command line passed location. Originally, I
tried to solve this problem by creating an AssemblyResolve handler and
registering it very early in hte main function.
The problem is that the application actually uses some of these
assemblies. In particular, one of the classes (named MainWindow)
derives from a class in the library. If the runtime attempts to create
a MainWindow before the handler is loaded, then I have a problem.
Fair enough. However, the way I understand the JIT, I thought it would
not attempt to load dependent libraries until the class is used or a
static call is made on that class. I made a seperate "Launcher" class
that the main funciton and the handler, but I am still failing to
resolve the assembly before I even reach my main function.
I am reasonably certain that if I wrote an entire launcher assembly
then this method would work, but I'm hoping there's a "cleaner" way to
fix this problem. Has anyone ever run into this problem?