Groups | Blog | Home
all groups > dotnet clr > august 2003 >

dotnet clr : Dynamic Loading


Jon Poploskie
8/21/2003 3:57:10 PM
Hello,

I am trying to utilize dynamic loading in my application (via
Assembly.Load). When the application is deployed, this should be a simple
matter, as all of the assemblies to be loaded will be located in the same
(application bin directory), however, during development, they are all in
different (project) directories. So Load can't find them. For example, I
have 1 solution that has multiple projects, and each project is in it's own
directory structure. One project wants to dynamically load another one (I
know it sounds odd to not just use project references for this situation,
but there are other circumstances for dynamic loading). How can I configure
things so that Assembly.Load knows where to look for the assemblies during
development vs. when they're deployed? Can I use different config files?
I've tried using DEVPATH, but can't make that work...

Any suggestions are greatly appreciated...
Thanks
Jon

Alan Shi [MSFT]
8/21/2003 7:56:43 PM
You could consider using a special config file only during development that
contains <codebase> elements that give the location to your assemblies. See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfcodebase.asp.

..\lan

--
This posting is provided "AS IS" with no warranties, and confers no rights.
http://blogs.gotdotnet.com/alanshi


[quoted text, click to view]

AddThis Social Bookmark Button