Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>According to Microsoft there are (at least) three ways of referencing assemblies:</p> <ul> <li>install the assembly in the GAC</li> <li>specify the assembly in the application configuration</li> <li>or use the AssemblyResolve Event</li> </ul> <p>The GAC is no option here, as you would have the same problem (same names).</p> <p>Using the AssemblyResolve Event and then use Assembly.LoadFrom would possibly a way of doing it, but easier would be imho ...</p> <p>... to do it the second mentioned way: specify the assembly in the application configuration. Here you basically edit the App.config like so:</p> <pre><code>&lt;configuration&gt; &lt;runtime&gt; &lt;assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″&gt; &lt;probing privatePath=”bin;Silverlight;ParentFolder\SubFolder;”/&gt; &lt;/assemblyBinding&gt; &lt;/runtime&gt; &lt;/configuration&gt; </code></pre> <p>and the application will search for the assemblies in specified directories.</p> <p>So, you could create specific folders (possibly "NET" and "Silverlight" or the like), copy the respective assembly into that folder and probe for the assembly in the proper folder as described above.</p> <p>Considering that when no reference is specified in the application configuration the application will be looking into either the same folder as the referencing assembly <em>or</em> into a folder with the name of the referencing assembly, you could also simply create 2 folders with the same name as the respective application (say "Client" and "Server" if they are called "Client.exe" and "Server.exe") and copy the proper assembly into that folder. In that case there would not even be any need to change the application configuration file.</p>
 

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