简体   繁体   中英

Is there any reason to add a DLL to your /bin directory, but not add a reference to it?

I understand that adding a reference to an assembly from a project makes the namespaces/types/classes of the referenced assembly available to your code. But would there ever be a reason why you'd add an assembly to your /bin, but not need to add a reference to it from your project?

I mean is the DLL all but useless until a reference is added?

Not at all. Reflection allows to load an assembly at runtime without any prior reference. Think how this is useful in a plugin architecture

If you're building ASP Web Site than you just place the dll's in the bin.

if you're creating an ASP Web Application, then you need to add it as a reference.

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