find assemblies in subdirectories

  • Thread starter Thread starter Lance Johnson
  • Start date Start date
L

Lance Johnson

We were wondering if there was a way to force .Net to search in
subdirectories for assemblies or if anybody knew of some way to do this? So
far I've been looking into the appdomain object. I can add some private
assembly paths, but didn't know if that's the easiest/best way to do this.

Lance Johnson
 
ASP.NET takes control over many of the runtime settings, and the probing
setting is not honored.

The only other options are the GAC or a subdirectory under bin with the same
name as the assembly you'd like to load.

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
Hi Brock,

Are you saying that the <probing> element has no effect? In that case I do
not agree since I have used it. But it seems that you have to use the
<compilation> element as well in order to make it work:

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin2"/>
</assemblyBinding>
</runtime>

<system.web>
<compilation
defaultLanguage="c#"
debug="true">
<assemblies>
<add assembly="MyAssemblyName" />
</assemblies>
</compilation>
</system.web>

BTW, bin2 does not have to be a subdirectory of bin but it has to be a
subdirectory of the virtual directory of the asp.net application.

Regards, Jakob.
 
Back
Top