首页 > 其他 > 详细

定位程序集

时间:2014-04-10 22:14:45      阅读:436      评论:0      收藏:0      [点我收藏+]

运行时通过探测的方法来查找没有基本代码的程序集。 How the Runtime Locates Assemblies.‘>有关探测的更多信息,请参见运行时如何定位程序集

&lt;probing&gt; element in the application configuration file to specify subdirectories the runtime should search when locating an assembly.‘>可以在应用程序配置文件中使用 <probing> 元素,来指定在查找程序集时运行时应搜索的子目录。 下面的示例说明如何指定运行时应搜索的目录。

 
 
<configuration>
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <probing privatePath="bin;bin2\subbin;bin3"/>
      </assemblyBinding>
   </runtime>
</configuration>

privatePath 特性包含运行时应在其中搜索程序集的目录。 如果应用程序位于 C:\Program Files\MyApp,那么运行时将在 C:\Program Files\MyApp\Bin、C:\Program Files\MyApp\Bin2\Subbin 和 C:\Program Files\MyApp\Bin3 中查找未指定基本代码的程序集。 privatePath 中指定的目录必须是应用程序基目录的子目录。

定位程序集,布布扣,bubuko.com

定位程序集

原文:http://www.cnblogs.com/lenmom/p/3656840.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!