title: Dapper called in application, and called in DLL is throwing a MissingMethodException
body: <p>I'm wondering why my application that is referencing a dll I created that also uses Dapper is failing.
  I get a <code>Method not found: 'System.Collections.Generic.IEnumerable'1&lt;!!0&gt; Dapper.SqlMapper.Query(System.Data.IDbConnection, System.String, System.Object)'.</code> error message.
  When I track this down to the offending code it appears to be in DotPdfInvoideLayout.dll @ <code>InvoiceManager.LoadData()</code>
  Here below is the code for the method that is failing, because I'm calling this as a dll, the Stack Trace points to the last curly brace of the method. Line 1988.  I am assuming that my real problem is the line that makes the call to <code>Query()</code></p>
  
  <pre><code>public void loadData(IEnumerable&lt;IPdfRenderable&gt; textBoxes)
  {
      var conn = new SqlConnection("Server=something;DataBase=TRIMS;UID=user;Password=password;");
      var output = conn.Query&lt;TRIMNameAddressMaster&gt;("Select top 1 * from Trims.dbo.TRIMNAMEADDRESSMASTER where id =  '" + _transaction.strap + "'", null).FirstOrDefault();
  
      var type = output.GetType();
  
      var properties = type.GetProperties();
  
  
      var r = new System.Text.RegularExpressions.Regex(@"((?&lt;=\{)[^}]*(?=\}))+");
  
  
  
      foreach (var textbox in textBoxes)
      {
  
          var matches = r.Matches(((PdfTextBox)textbox).Text);
  
          foreach (Match match in matches)
          {
              try
              {
                  var p = properties.Single(pi =&gt; pi.Name.ToLower() == match.Value.ToLower());
                  ((PdfTextBox)textbox).Text = ((PdfTextBox)textbox).Text.Replace(
                      "{" + match.Value + "}", (p.GetValue(output, null) ?? string.Empty).ToString());
              }
              catch (Exception ex)
              {
                  Console.WriteLine("No Mapping occurred" + match.Value);
              } 
          }
  
      }
  }
  </code></pre>
  
  <p>As a console application <code>DotPdfInvoiceLayout</code> runs perfectly fine. 
  I removed the Main() and changed the project properties to run this as a Class Library then copied the 
  generated dll into the bin of my web application and referenced the dll in the web project.</p>
  
  <p>I've tried to make sure both are using the same version of Dapper.</p>