c# - how to load in new appdomain from filepath? -
İ sorry classic problem loading dll. can not solve basic problem: have plugins file path want load these assembly new domain can not this. firstly; web application code below: :
foreach (var filepath in arryfiles) { assembly asm = assembly.loadfile(filepath.tostring()); appdomainsetup domainsetup = new appdomainsetup(); domainsetup.applicationbase = appdomain.currentdomain.basedirectory; domainsetup.disallowbindingredirects = false; domainsetup.disallowcodedownload = true; domainsetup.loaderoptimization = loaderoptimization.singledomain; domainsetup.configurationfile = appdomain.currentdomain.setupinformation.configurationfile; applicationhost = appdomain.createdomain("ops.mgr.service", null, domainsetup); // how load domain assembly... } helps...
do want load assembly in same app domain or different app domain?
here solution load assembly in different app domain: loading dlls separate appdomain
for loading assembly in same app domain: can load .net assembly @ runtime , instantiate type knowing name?
Comments
Post a Comment