Hi
I think you may try to take a look at the AppDomain.AssemblyResolve Event
which occurs when the resolution of an assembly fails.
public Connect()
{
AppDomain cAppDm = AppDomain.CurrentDomain;
cAppDm.AssemblyResolve+=new ResolveEventHandler(cAppDm_AssemblyResolve);
}
private Assembly cAppDm_AssemblyResolve(object sender, ResolveEventArgs
args)
{
System.Diagnostics.Debug.WriteLine("Hello"+args.Name.ToString());
Assembly ass = Assembly.LoadFrom(@"C:\TestClass.dll");
return ass;
}
In normal loading process, the AssemblyResolve will not be called only when
the CLR try to load certain assembly including the PIA failed it will fire
the Event, if we provide the assembly here, the loading process will
continue, else it will not continue and we will get the error load addin.
I think you may try to show the dialog in the AssemblyResolve event handler
function.
If you still have any concern, please feel free to post here.
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.