Obviate DevPath
I waffle to discuss this because I don'’t want people who donn’t know about it to think, “Hey, what’s this DevPath thing? I call for that.” But, mayhap if I don'’t explain how to use it, it will be too much effort for people who don’t already know how.
(And, for those who already know how and are, in fact, using it, hopefully, they’ll see this and get off that plan.)
The intent of DevPath was to make the development environment less painful. Assemblies could be placed at that place and bound to at runtime, disregarding the assembly version and overruling the GAC.
It sprains out that that’s badness for several reasons (below). Hence, DevPath is shortly to be deprecated. Don’t apply it - not yet in the development environment.
Why It Should Ne’er Be Employed
Versioning exclusively is why you should ne’er, ever utilise it in a production environment. It supports your users to dll hell. Take care Ward off Fond Binds for details (DevPath makes fond binding, since the version is ignored for the bind).
It’s not well for the dev. env., either - it gets to it unnecessarily unlike from the embarking env., which may lead to uncaught versioning or deployment bugs in the embarking env.
What to Do Or else
If DevPath was a development environment-only solution for you:
I powerfully commend not interchanging your assembly versions between non-shipping progresss alternatively of utilizing DevPath.
If you are embarking code relying on DevPath:
One thing you could do is make a newfangled AppDomain with the ApplicationBase set to the path you like almost. Once you do that, escort Executing Code in Another Appdomain.
If there are multiple paths you desire to lade assemblies from, utilise PrivateBinPath or multiple AppDomains. If that’s not fairish for you, study employing the LoadFrom context.
