简体   繁体   中英

Reflection.Assembly::Load method

When I try to load an assembly using this method, what's the differences between long name and partial name? From MSDN , I get this: for long name: A full assembly reference is required if you reference any assembly that is part of the common language runtime or any assembly located in the global assembly cache. for partial name: the runtime looks for the assembly only in the application directory

And a customer encountered an error because I used partial name to load the assembly, but the assembly was exactly in the application directory.

So, I want to know, are there any other differences between long name and partial name when using the Load(string) method?

Thanks a lot!

@gTiancai: On a safer side, setting the AssemblyName.CodeBase property might be helpful.

This might help: Best Practices for Assembly Loading

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM