Simon Fell > Its just code > System.Reflection.ReflectionTypeLoadException

Wednesday, April 9, 2003

I knew as soon as I posted about loading types from the plugins directory, that it'd break !, its very strange, I have a build of restlogClient and its dependencies in a plugins directory under my local build of synderilla. When I call GetTypes on the plugin assembly it throws the RTLE exception.
Assembly al = Assembly.LoadFrom(@"C:\Source\dotnet\Syndirella\bin\Debug\plugins\restlogClient.exe");
Type[] mytypes = al.GetTypes();
foreach(Type tt in mytypes)
{
	Console.WriteLine("{0}", tt.ToString() ) ;
}
Exactly the same code in console app, or new winforms app works fine, as does ildasm.

Update Got it. Synderilla is built against v0.7 of XmlRpc.NET, but restlogClient is built against v0.81 of XmlRpc.NET. When it loads the restlogClient assembly it doesn't load the XmlRpc.dll from that directory but seems to re-use the earlier version its already loaded (guess i need to go re-read Don's book)