Question

I have an application that depends on other .net assemblies. When I start the application, I get an error that an assembly or one of its dependencies cannot be loaded.

I do not want to put the assemblies into the GAC or into the Directory of the application. Is there a way (app.config?) to tell .net to look into a given path when trying to load assemblies? I believe I can use assembly binding for a single assembly, but I'm looking for a wildcard solution to add a path to the "search paths"

Was it helpful?

Solution

Unfortunately it's not as simple as just telling an application where it should find assemblies. There are fixed algorithms for determining what locations are probed for assemblies, and also for the trust that given to them. Location is a part of an assembly's evidence, and as such contributes towards its trust level. Suzanne Cook posted a couple of really meaty posts on this; check out:

Choosing a Binding Context

http://blogs.msdn.com/suzcook/archive/2003/05/29/57143.aspx

-Oisin

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top