Home   Cover Cover Cover Cover
 

Probing

Question: Assume that the private assembly Utils is needed for the executions the application MyApp that was loaded from c:\Programs\MyAppDir\. Where does the CLR look for this assemlby?

Answer: see 3.7.2 Loading and Execution of Managed Code, Locating an Assembly

Private assembly have to lie in a subdirectory of the application directory and are always located by a mechanism called probing. This starts looking for files with the extension .dll and then tries .exe.

The following paths will be searched during probing:

  c:\Programme\MyAppDir\Utils.dll
  c:\Programme\MyAppDir\Utils\Utils.dll
  c:\Programme\MyAppDir\bin\Utils.dll
  c:\Programme\MyAppDir\bin\Utils\Utils.dll

  c:\Programme\MyAppDir\Utils.exe
  c:\Programme\MyAppDir\Utils\Utils.exe
  c:\Programme\MyAppDir\bin\Utils.exe
  c:\Programme\MyAppDir\bin\Utils\Utils.exe