我之前问过大家关于AppDomain与程序集的问题有如下代码: AppDomainSetup setup = new AppDomainSetup(); setup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory; setup.PrivateBinPath = AppDomain.CurrentDomain.BaseDirectory; setup.ShadowCopyFiles="true"; setup.ShadowCopyDirectories = AppDomain.CurrentDomain.BaseDirectory; domain = AppDomain.CreateDomain(dllName,null,setup); domains.Add(dllName, domain); try { remoteLoader = (CGNPC_Portal.Common.RemoteLoader)domain.CreateInstanceFromAndUnwrap("RoleQueryTest.dll", "CGNPC_Portal.Common.RemoteLoader"); } catch(Exception ee) { throw ee; }我是照着网上的做的,现在我把RoleQueryTest.dll放在了GAC下。可是在反射RemoteLoader的时候,程序却是到file:///c:\\windows\\system32\\inetsrv\\RoleQueryTest.dll下去寻找RoleQueryTest.dll,请问我要如何修改代码才能让它到GAC或指定的目录下去寻找呢?多谢大家了。
添加回答
举报
0/150
提交
取消