<探测 > 元素<probing> Element

指定公共语言运行时在加载程序集时要搜索的应用程序基子目录。Specifies application base subdirectories for the common language runtime to search when loading assemblies.

<configuration><configuration>
<运行时 ><runtime>
<assemblyBinding><assemblyBinding>
<探测 ><probing>

语法Syntax

<probing privatePath="paths"/>  

特性和元素Attributes and Elements

下列各节描述了特性、子元素和父元素。The following sections describe attributes, child elements, and parent elements.

特性Attributes

特性Attribute 描述Description
privatePath 必需的特性。Required attribute.

指定可能包含程序集的应用程序的基目录的子目录。Specifies subdirectories of the application's base directory that might contain assemblies. 分隔每个子目录以分号结尾。Delimit each subdirectory with a semicolon.

子元素Child Elements

无。None.

父元素Parent Elements

元素Element 描述Description
assemblyBinding 包含有关程序集版本重定向和程序集位置的信息。Contains information about assembly version redirection and the locations of assemblies.
configuration 公共语言运行时和 .NET Framework 应用程序所使用的每个配置文件中的根元素。The root element in every configuration file used by the common language runtime and .NET Framework applications.
runtime 包含有关程序集绑定和垃圾回收的信息。Contains information about assembly binding and garbage collection.

示例Example

下面的示例演示如何指定运行时应搜索程序集的应用程序基子目录。The following example shows how to specify application base subdirectories the runtime should search for assemblies.

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

请参阅See also