title: Is it possible to specify .NET service pack in "supportedRuntime" in app.config?
body: <p>I have an application that runs fine on .Net 2.0 SP2, but fails to run properly on .NET 2.0 RTM. (FYI: It fails when calling a method a managed DLL that is a wrapper for a native DLL for USB programming).</p>
  
  <p>I know you can give supported runtimes in the app.config of a C# .NET application</p>
  
  <pre><code>  &lt;startup&gt;
      &lt;supportedRuntime version="v2.0.5727" /&gt;
      &lt;supportedRuntime version="v4.0" /&gt;
    &lt;/startup&gt;
  </code></pre>
  
  <p>However, is it also possible to specify a specific Service Pack version? </p>
  
  <p>Thanks!</p>
  
  <p>Edit: I did now find out which method fails between 2.0 and 2.0 SP2. It is WaitHandle.WaitOne(int) which was added in 2.0 SP1. </p>
  
  <p>A tip for everyone else having the problem, the compiler doesn't say anything but if you  ngen the executable with the problematic runtime, it does give you the exact error. </p>
  
  <p>E.g.:</p>
  
  <pre><code>Warning: System.MissingMethodException: Method not found: 'Boolean System.Threading.WaitHandle.WaitOne(Int32)'. while resolving 0xa0000e1 - System.Threading.WaitHandle.WaitOne.
  11/11/2010 01:54:07 [3620]: Method not found: 'Boolean System.Threading.WaitHandle.WaitOne(Int32)'. while compiling method XXX
  </code></pre>
  
  <p>Rogier</p>