title: C# 9 top-level programs without csproj?
body: <p>One feature of coming C# 9 is so called top-level programs. So that you could just write the following without classes.</p>
  <pre><code>using System;
  
  Console.WriteLine(&quot;Hello World!&quot;);
  </code></pre>
  <p>and <code>dotnet run</code> will launch it for you.</p>
  <p>It works for me, but only if I also add a <code>.csproj</code> file like the one below</p>
  <pre><code>&lt;Project Sdk=&quot;Microsoft.NET.Sdk&quot;&gt;
      &lt;PropertyGroup&gt;
          &lt;OutputType&gt;Exe&lt;/OutputType&gt;
          &lt;TargetFramework&gt;net5.0&lt;/TargetFramework&gt;
      &lt;/PropertyGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  <p>Is there a way to skip <code>.csproj</code> from the picture? :) So that there's just a single <code>Program.cs</code> file and nothing more.</p>