title: No boxing or type parameter conversion for generic Type parameter with Mono
body: <p>What's wrong with the following code? I cannot see the reason for the error mentioned below. I'm using Mono, could this be a bug in Mono, and will it compile without errors in VStudio?</p>
  
  <pre><code>public static class ClientFactory {
    public static T CreateClient&lt;T, I&gt;()
      /* error here */
      where T : ClientBase&lt;I&gt;, I
      where I : class {
      return CreateClient&lt;T, I&gt;(null, null);
    }
  
    public static T CreateClient&lt;T, I&gt;(string endpointConfigurationName)
      /* error here */
      where T : ClientBase&lt;I&gt;, I
      where I : class {
      return CreateClient&lt;T, I&gt;(endpointConfigurationName, null);
    }
  
    public static T CreateClient&lt;T, I&gt;(string endpointConfigurationName, string remoteAddress)
      /* error here */
      where T : ClientBase&lt;I&gt;, I
      where I : class {
      return CreateClient&lt;T, I&gt;(endpointConfigurationName, remoteAddress, Settings.Default.UserName, Settings.Default.Password);
    }
  
    public static T CreateClient&lt;T, I&gt;(string endpointConfigurationName, string remoteAddress, string userName, string password)
      /* NO error here, this method compiles fine */
      where T : ClientBase&lt;I&gt;, I
      where I : class {
  
      T client;
  
      /* get client instance */
      /* do stuff with it */
  
      return client;
    } 
  }
  </code></pre>
  
  <p>I'm getting the compile error:</p>
  
  <blockquote>
    <p>…/ClientFactory.cs(14,14): Error CS0314: The type `T' cannot be used as type parameter `T' in the generic type or method `….ClientFactory.CreateClient(string, string)'. There is no boxing or type parameter conversion from `T' to `System.ServiceModel.ClientBase' (CS0314)</p>
  </blockquote>