title: Build .Net Core as an EXE not a DLL
body: <p>I want to build a .NET Core project as a EXE and not a DLL so it can be executed. </p>
  
  <p>The answer here did not work: <a href="https://stackoverflow.com/questions/36516848/how-to-run-a-net-core-dll">How to run a .Net Core dll?</a></p>
  
  <p><strong>Here is the sample code:</strong></p>
  
  <pre><code>using System;
  
  namespace ConsoleApplication
  {
      public class Program
      {
          public static void Main(string[] args)
          {
              Console.WriteLine("Hello World!");
          }
      }
  }
  </code></pre>
  
  <p><strong>Here is my project.json:</strong></p>
  
  <pre><code>{
    "version": "1.0.0-*",
    "compilationOptions": {
      "emitEntryPoint": true
    },
    "buildOptions": {
      "debugType": "portable",
      "emitEntryPoint": true
    },
    "dependencies": {},
    "frameworks": {
      "netcoreapp1.1": {
        "dependencies": {
          "Microsoft.NETCore.App": {
            "type": "platform",
            "version": "1.1.0"
          }
        },
        "imports": "dnxcore50"
      }
    }
  }
  </code></pre>
  
  <p>I'm currently using VSCode, whenever I build the project with the build task, or run <code>dotnet restore</code> I just get a <code>.dll</code> in my <code>bin/Debug</code> folder.</p>
  
  <p>How do you build a .NET Core application as an exe? </p>
  
  <p>Bonus: I do, will that run on a mac or other device?</p>