title: Can't compile Environment.Exit in .NET Core
body: <p>Related: <a href="https://stackoverflow.com/questions/28497438/system-environment-in-net-core">System.Environment in .NET Core</a></p>
  
  <p>I'm trying to compile a program which uses <code>Environment.Exit</code> in .NET Core. I've used <code>yo aspnet</code> to create the default console application, installed <code>System.Runtime.Extensions</code> and then added a call to <code>Environment.Exit(1)</code> (full sample <a href="https://github.com/nyctef/environment-exit-test/tree/master/ConsoleApplication" rel="nofollow noreferrer">on github</a>). When running <code>dnu build</code> I get this error:</p>
  
  <p><code>C:\git\environmentexit\ConsoleApplication\Program.cs(13,25): DNXCore,Version=v5.0 error CS0117: 'Environment' does not contain a definition for 'Exit'
  </code></p>
  
  <p>As far as I can tell, <a href="https://github.com/dotnet/corefx/pull/4266" rel="nofollow noreferrer">this corefx pull request</a> should mean that <code>Environment.Exit</code> is exposed, so I can't figure out what else I'm missing.</p>
  
  <p>Any ideas?</p>