title: How to fix int does not contain a definition for int.TryParse()?
body: <p>In my new CF winform I suddenly cannot code <code>int.TryParse()</code>, with VS showing the message <code>'int' does not contain a definition for 'TryParse'</code>, but in another form this is no problem. So strange!</p>
  
  <p>I tracked this down, with Go To Definition, that the old form uses <code>int</code> from <code>C:\DOCUME~1\XPMUser\LOCALS~1\Temp\3464$CommonLanguageRuntimeLibrary$v2.0.50727\System.Int32.cs</code> which of course has <code>TryParse()</code>, while my new code uses <code>int</code> from <code>C:\DOCUME~1\XPMUser\LOCALS~1\Temp\3464$mscorlib.dll$v2.0.50727\System.Int32.cs</code>, which has no <code>TryParse()</code>.</p>
  
  <p>In the list of references of the project, there is a <code>mscorlib</code>, and by double-clicking I arrive in the Object Browser at <code>mscorlib [Compact Framework]</code>, while the object browser also shows an entry <code>mscorlib</code>, i.e. without the CF remark.</p>
  
  <p>This did not help me much, hopefully someone can help me get TryParse() back. </p>
  
  <p>Here is sample code with the error:</p>
  
  <pre><code>using System;
  using System.Linq;
  using System.Collections.Generic;
  using System.Text;
  
  namespace SIClient2.WebServices
  {
      class Test
      {
          public Test()
          {
              int i;
              int.TryParse("123", out i); // &lt;== 'int' does not contain a definition for 'TryParse'
          }
      }
  }
  </code></pre>
  
  <p>The code without the error is part of a winform. Does that make a diff?</p>