Hi,
We are moving to .NET 4.0. Our application is using ResolveEventHandler to load the proper assemblies (based on some XML files, so we could have multiple versions).
We do not have separate resources - all is embedded in the executables/dlls.
We have got a nice "AppName.resources" file-not-found exceptions when the resources are to be loaded.
What I figured out was that that from .NET 4.0 this delegate is called back for RESOURCE assemblies as well - so getting this exception is a kind of "feature" [http://msdn.microsoft.com/en-us/library/system.resolveeventhandler(v=vs.100).aspx]
The questions here are:
1. Why the delegate is called with the "AppName.resources" file at all? [OK, it should be because this way locale-specific applications can decide what to load]
2. What assembly to return if the is no separate assembly at all [e.g. resources are embedded in the executable]?
3. Is it just sheer luck that returning the assembly where the delegate's code is, works?
4. Returning the assembly of where the resource really is does not work. Why? Is there any explanation to this?
Thanks in advance
-seci