Re: Search path for assemblies
From: Richard Blewett [DevelopMentor] (richardb_at_NOSPAMdevelop.com)
Date: 11/29/04
- Next message: Tim pd UK: "Help with ASP.net & Active Directory"
- Previous message: Param R.: "Re: middle tier recommendations"
- In reply to: Joyjit Mukherjee: "Re: Search path for assemblies"
- Messages sorted by: [ date ] [ thread ]
To: microsoft.public.dotnet.framework Date: Mon, 29 Nov 2004 07:18:30 -0800
You can only extend the probing path to subdirectories under the appbase, sibling directories will not be searched via probing.
The whole point of this is that without strong names there is no way for the runtime to guarantee that its picked up the correct assembly as it only performs file name matching. So you could accidently pick up an assembly that someone else wrote that just happened to have the same name as the one you intended. Thats why for non-strong named assemblies the assembly resolver works on the basis that the child assemblies are physically constrined within the Appbase and its subdirectories
Regards
Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
Hi,
yes, you can add a probing element to your app.config file: -
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin1;bin2\bin3;..\MyPrivatePath"/>
</assemblyBinding>
</runtime>
</configuration>
Here, it will search for the referenced assemblies in the path bin1,
bin2\bin3 relative to your assembly's path, and MyPrivatePath as root
relative to your assembly's path.
Let me know if you need anything else.
Thanks
Joyjit
- Next message: Tim pd UK: "Help with ASP.net & Active Directory"
- Previous message: Param R.: "Re: middle tier recommendations"
- In reply to: Joyjit Mukherjee: "Re: Search path for assemblies"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|