c# - GetCustomAttributes from dynamically loaded Assembly -


i want this:

appdomain domain = appdomain.createdomain("dataspecdomain"); assembly dataspecassembly = domain.load(fullassemblyfilepath); object[] dataspecattrcollection = dataspecassembly.getcustomattributes(typeof(dataspecificationattribute), true); 

actually, didn't have appdomain portion , using assembly.loadfrom() evidently not recommended these days in lieu of security. problem code assemblies loading new domain built own references third-party api. in fact, third-party api references shell-representation of actuals lie in third-party exe directory. when referencing these, copy local set false. end result fileloadexception. if add shell references debug folder, works. there way can attribute instances without having deal loading assembly's dependencies? or there way resolve loading assembly's dependencies without having place third-party api references in same folder.

just reference, third-party product designed special directory used auto-loading, meaning typical development shouldn't need references in same folder.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -