title: Is it possible to replace a reference to a strongly-named assembly with a "weak" reference?
body: <p>I'm writing a .NET tool that requires the SQL Server SMO library. I don't care if it's the version from Server 2005 (9.0), 2008 (10.0) or 2008 R2 (probably 10.5, didn't check). The SMO library is installed together SQL Server, so I can safely assume that on any system with SQL Server installed, some version of the SMO library is available as well.</p>
  
  <p>Unfortunately, the SMO libraries are strongly-named: If I add a reference to SMO 9.0 in my project, it will fail (<code>FileNotFoundException</code>) if only SMO 10.0 is present on the customer's system, and vice versa.</p>
  
  <p><strong>Is there some way to tell the compiler that <em>any</em> version of the library is fine for me?</strong> Or do I really have to distribute 3 identical versions of my tool, each compiled to a different version of the SMO?</p>
  
  <hr>
  
  <p><em>Disclaimer: I do know that the SMO libraries (and the libraries required by the SMO libraries) can be redistributed. But there's a big difference between (a) one slim 100KB standalone EXE and (b) a full-blown setup package that installs a whole bunch of prerequisites.</em></p>
  
  <p><em>Disclaimer 2: I am aware of the following duplicates:</em></p>
  
  <ul>
  <li><a href="https://stackoverflow.com/q/2491787/87698">c# - can you make a “weak” assembly reference to a strong named assembly</a></li>
  <li><a href="https://stackoverflow.com/q/2630073/87698">Need a C# Assembly to reference a strongly named assembly loosely</a></li>
  </ul>
  
  <p><em>The solutions provided do not fit, however. In question 1, the developer has control over the referenced DLL (which I do not); in question 2, the developer has control over the target systems (which I do not either).</em></p>