简体   繁体   English

引用不在/ bin或GAC中的程序集

[英]reference an assembly not in /bin or in the GAC

I want to load a managed DLL that's neither in my application's /bin directory nor in the GAC. 我想加载不在应用程序的/ bin目录或GAC中的托管DLL。 Is there a way add it to system.web/compilation/assemblies in web.config by path? 有没有一种方法可以通过路径将其添加到web.config中的system.web/compilation/assemblies中?

The simplest thing to do is, of course, to put the assembly in /bin like a normal person. 当然,最简单的方法是像正常人一样将程序集放在/ bin中。 If for some reason you find yourself needing to reference assemblies from another path, there's the assemblyBinding tag you can put in web.config to cause it to look elsewhere. 如果由于某种原因您发现自己需要从其他路径引用程序集,则可以在web.config中放入assemblyBinding标记 ,以使其在其他地方查找。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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