I would be curious to know more about this issue as well, because I cant tell either if its a feature or a bug.
>> If I load the latter assembly >first (see the commented out code below) everything works fine. >However I would expect the referenced assemblies to get loaded >automatically when needed (they are all in the GAC). I observe that the referenced assemblies do get loaded automatically. During the call to serviceProcess.GetTypes(), the System.Configuration.Install assembly is loaded. However, the assembly that gets loaded is not the one in the directory specified by your GACPath variable. In fact the one that gets loaded is the one in the true GAC, the one located at C:/WINNT/assembly/GAC... Interestingly, if the System.ServiceProcess assembly is loaded directly from the GAC like so serviceProcess = Assembly.LoadFrom (@"C:\WINNT\assembly\GAC\System.ServiceProcess\1.0.3300.0__b03f5f7f11d50a3a\ " + "System.ServiceProcess.dll"); then no exception is thrown. So it seems like if both the Service.Configuration.Install and System.ServiceProcess assemblies are loaded from the same place (i.e both come from the GAC, or both come from C:\WINNT\Microsoft.NET\Framework\v1.0.3705\), then things seem ok, but if each assembly comes from a different place, then we get the exception. Something seems fishy here, or Im very confused... Any takers? -John You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.