title: Inline variable declaration not compiling
body: <p>I've been getting a message in Visual Studio 2017, specifically, <code>IDE0018 Variable declaration can be inlined.</code></p>
  
  <p>So I try using an inline variable declaration the way it's mentioned in the visual studio 2017 release notes, but I can't get my project to compile.  </p>
  
  <p>It show no error messages, but the output shows "<code>Rebuild All failed.....  error CS1525: Invalid expression term 'int'</code>"  </p>
  
  <p>The error only shows up in the output, not as an actual error in the error list.</p>
  
  <p>Here is an actual example of the code I'm using that is failing.</p>
  
  <pre><code>if (int.TryParse(ExpYear, out int IExpYear))
    {
      if (IExpYear &lt; DateTime.Now.Year || IExpYear &gt; DateTime.Now.AddYears(10).Year)
      {
        e += "Expiration Year is invalid.\n";
      }
    }
    else
    {
      e += "Expiration Year is not a number.\n";
    }
  </code></pre>
  
  <p>If I revert the change, it compiles as expected.  Is it possible that I'm not using the c#7 compiler somehow?</p>
  
  <p>Thank you.</p>
  
  <p>Update: I found the language setting in Build > Advanced and set it to C# 7.0.  Building the project now gives me this error:</p>
  
  <blockquote>
    <p>CSC : error CS1617: Invalid option '7' for /langversion; must be ISO-1, ISO-2, Default or an integer in range 1 to 6.</p>
  </blockquote>