title: XUnit test project with only 1 Main method: "Program has more than one entry point defined."
body: <p>I converted a vNext format .NET xUnit test project (with project.json) to the new .csproj format in Visual Studio 2017 RC and started getting the below error. Most of the online answers to this error say "You have two Main methods; get rid of one." This seems like an obvious solution, but this project has only one Main method.</p>
  
  <p><strong>Error:</strong></p>
  
  <blockquote>
    <p>CS0017    Program has more than one entry point defined. Compile with /main to specify the type that contains the entry point.    Project.Name C:\path\to\Program.cs</p>
  </blockquote>
  
  <p><strong>Program.cs:</strong></p>
  
  <pre><code>using XunitProgram = Xunit.Runner.DotNet.Program;
  
  namespace My.Namespace.Tests
  {
      public static class Program
      {
          public static void Main(string[] args)
          {
              XunitProgram.Main(args);
          }
      }
  }
  </code></pre>
  
  <p><strong>Old project.json:</strong></p>
  
  <pre><code>{
    "version": "1.0.0-*",
    "testRunner": "xunit",
      "buildOptions": {
          "emitEntryPoint": true,
          "preserveCompilationContext": true,
          "debugType": "full"
      },
  
      "dependencies": {
          "dotnet-test-xunit": "2.2.0",
          "xunit": "2.2.0",
          "Microsoft.DotNet.InternalAbstractions": "1.0.0"
      },
    "frameworks": {
      "net462": {}
    }
  }
  </code></pre>
  
  <p><strong>New Project.csproj:</strong></p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk"&gt;
  
      &lt;PropertyGroup&gt;
          &lt;TargetFramework&gt;net462&lt;/TargetFramework&gt;
          &lt;RuntimeIdentifier&gt;win7-x86&lt;/RuntimeIdentifier&gt;
          &lt;DebugType&gt;full&lt;/DebugType&gt;
          &lt;PreserveCompilationContext&gt;true&lt;/PreserveCompilationContext&gt;
          &lt;AssemblyName&gt;My.Project.Tests&lt;/AssemblyName&gt;
          &lt;OutputType&gt;Exe&lt;/OutputType&gt;
          &lt;PackageId&gt;My.Project.Tests&lt;/PackageId&gt;
          &lt;GenerateRuntimeConfigurationFiles&gt;true&lt;/GenerateRuntimeConfigurationFiles&gt;
          &lt;GenerateAssemblyConfigurationAttribute&gt;false&lt;/GenerateAssemblyConfigurationAttribute&gt;
          &lt;GenerateAssemblyCompanyAttribute&gt;false&lt;/GenerateAssemblyCompanyAttribute&gt;
          &lt;GenerateAssemblyProductAttribute&gt;false&lt;/GenerateAssemblyProductAttribute&gt;
          &lt;RootNamespace&gt;My.Project.Tests&lt;/RootNamespace&gt;
          &lt;StartupObject /&gt;
      &lt;/PropertyGroup&gt;
  
      &lt;ItemGroup&gt;
          &lt;PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170106-08" /&gt;
          &lt;PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" /&gt;
          &lt;PackageReference Include="xunit" Version="2.2.0" /&gt;
      &lt;/ItemGroup&gt;
  
      &lt;ItemGroup Condition=" '$(TargetFramework)' == 'net462' "&gt;
          &lt;Reference Include="System" /&gt;
          &lt;Reference Include="Microsoft.CSharp" /&gt;
      &lt;/ItemGroup&gt;
  
      &lt;ItemGroup&gt;
          &lt;Folder Include="SampleInput\" /&gt;
      &lt;/ItemGroup&gt;
  
  &lt;/Project&gt;
  </code></pre>