This all seems like it's pointing me in the right direction, yet I can't quite put my fingers around it.
I have a VC++ project, and in one of the .cpp files I have
"using namespace MyNamespace"
MyNamespace is defined in a VC# DLL.
Now, I want to run the vc++ project without having to have the MyNamespace.dll located in the application directory of the project.
I don't know much about CLR and all of that, but why is it that all of the DLL reference issues aren't automatically resolved at runtime.
Regarding the link you posted about the app.config file, it seems like it would only be useful if I actually knew what directory the dll could be located in, hence I'd specify the assembly directory, or what have you. My issue is, I don't know where the MyNamespace DLL will be located at runtime. It could be anywhere. I'd like for the CLR to search the directories listed in the PATH env variable in hopes of resolving the reference issue.
Main Topics
Browse All Topics





by: gregoryyoungPosted on 2009-06-02 at 10:40:26ID: 24529366
See http://msdn.microsoft.com/ en-us/libr ary/yx7xez cf(vs.71). aspx
en-us/libr ary/ system .appdomain .assemblyr esolve(vs. 71).aspx or you can specify the locations directly in your app.config file (see last example here http://blogs.msdn.com/suzc ook/archiv e/2004/05/ 14/132022. aspx)
From there you have two options, you can either write custom code using the AssemblyResolve event http://msdn.microsoft.com/
Cheers,
Greg