Note that there are some explanatory texts on larger screens.

plurals
  1. POusing codebase element in .config file to load assembly from arbitrary path
    primarykey
    data
    text
    <p>My problem is to try to figure out how to load a .NET assembly from an arbitrary location. In my scenario, I don't want to use a subdirectory (ruling out a probing path approach) or the GAC. The subdirectory approach causes multiple copies of the assembly to be stored, since multiple callers use the assembly. The GAC scenario is the longer term answer, but there is some effort incurred in going to that approach. For Visual Studio 2010 I see GAC usage as having these primary options: the built-in installer has received a lot of criticism, the InstallShield Limited edition is pretty sweet but doesn't appear to support GAC (paid InstallShield versions do, of course), and WiX is regarded as having a learning curve for use.</p> <p>I mention all this about the GAC primarily because any of the numerous folks who have asked this question always seemed to get pointed in the direction of the GAC. It is frustrating because the codebase element seems to be precisely what I desire for my strongly-named caller and called assemblies. My app.config file looks like this:</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;configuration&gt; &lt;startup&gt; &lt;supportedRuntime version="v2.0.50727"/&gt;&lt;/startup&gt; &lt;runtime&gt; &lt;assemblyBinding xmlns="urn:schemas-microsoft.com:asm.v1"&gt; &lt;dependentAssembly&gt; &lt;assemblyIdentity name="SharedProgramTest" Culture="neutral" PublicKeyToken="c422f85319da5fe0" /&gt; &lt;codeBase version ="1.0.0.1" href="file:///D:/SomewhereElse/SharedProgramTest.dll" /&gt; &lt;/dependentAssembly&gt; &lt;/assemblyBinding&gt; &lt;/runtime&gt; &lt;/configuration&gt; </code></pre> <p>Thanks, John Wigger</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload