title: How to check programatically if an assembly reference exists in c#?
body: <p>I am trying to write a small c#/.net library for very specific financial calculations. </p>
  
  <p>I have written several classes that depend only on the standard assemblies of the .net framework. That is, the library with these classes require nothing other than the .net framework (4.0 client).</p>
  
  <p>Now I need an additional class for excel integration. This class will require additional assembly references related with microsoft office and excel, like their respective object libraries.</p>
  
  <p>My problem is: Some of the users of this library may have office and excel, some not. </p>
  
  <p>How can I add this additional class to the library so that both types of users can use the library without getting errors?</p>
  
  <p>More precisely: If a user does not have office and excel, user must be able to run all the classes excluding excel-related one without getting errors.</p>
  
  <p>thanks for any help, selmar</p>