title: Nunit-console - what is expected in .csproj file?
body: <p>I'm currently doing some tests with C# (using Mono and NUnit, all on OS X but it's supposed to run on Travis later). I did not install Visual studio and managed to get a "working" .csproj file:</p>
  
  <pre><code>&lt;Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Compile"&gt;
    &lt;Target Name="Compile"&gt;
      &lt;Csc Sources="@(Compile)" References="@(Reference)" TargetType="Library" /&gt;
    &lt;/Target&gt;
    &lt;Target Name="Test" DependsOnTargets="Compile"&gt;
      &lt;Exec Command="nunit-console nunit.csproj" /&gt;
    &lt;/Target&gt;
    &lt;ItemGroup&gt;
      &lt;Reference Include="nunit.framework.dll" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
       &lt;Compile Include="../csharp/class/CoffeeMachine.cs" /&gt;
       &lt;Compile Include="tests/Actionwords.cs" /&gt;
       &lt;Compile Include="tests/ProjectTest.cs" /&gt;
    &lt;/ItemGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>Compilation works fine but I can't execute the tests, I get the following error:</p>
  
  <pre><code>╰─$ nunit-console nunit.csproj
  NUnit version 2.4.8
  Copyright (C) 2002-2007 Charlie Poole.
  Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
  Copyright (C) 2000-2002 Philip Craig.
  All Rights Reserved.
  
  Runtime Environment - 
     OS Version: Unix 14.3.0.0
    CLR Version: 4.0.30319.17020 ( 4.2.0 (Stable 4.2.0.179/a224653 Tue Oct  6 11:27:49 PDT 2015) )
  
  Unhandled Exception:
  System.ArgumentException: Invalid project file format: nunit.csproj ---&gt; System.NullReferenceException: Object reference not set to an instance of an object
     at NUnit.Util.VSProject.LoadMSBuildProject (System.String projectDirectory, System.Xml.XmlDocument doc) in /private/tmp/mono20151006-19632-tqpley/mono-4.2.0/mcs/nunit24/ClientUtilities/util/VSProject.cs:line 257
     at NUnit.Util.VSProject.LoadProject (System.String projectDirectory, System.Xml.XmlDocument doc) in /private/tmp/mono20151006-19632-tqpley/mono-4.2.0/mcs/nunit24/ClientUtilities/util/VSProject.cs:line 210
     at NUnit.Util.VSProject.Load () in /private/tmp/mono20151006-19632-tqpley/mono-4.2.0/mcs/nunit24/ClientUtilities/util/VSProject.cs:line 184
    --- End of inner exception stack trace ---
     at NUnit.Util.VSProject.ThrowInvalidFormat (System.String projectPath, System.Exception e) in /private/tmp/mono20151006-19632-tqpley/mono-4.2.0/mcs/nunit24/ClientUtilities/util/VSProject.cs:line 307
     at NUnit.Util.VSProject.Load () in /private/tmp/mono20151006-19632-tqpley/mono-4.2.0/mcs/nunit24/ClientUtilities/util/VSProject.cs:line 197
     at NUnit.Util.VSProject..ctor (System.String projectPath) in /private/tmp/mono20151006-19632-tqpley/mono-4.2.0/mcs/nunit24/ClientUtilities/util/VSProject.cs:line 56
     at NUnit.Util.NUnitProject.FromVSProject (System.String vsProjectPath) in /private/tmp/mono20151006-19632-tqpley/mono-4.2.0/mcs/nunit24/ClientUtilities/util/NUnitProject.cs:line 234
     at NUnit.Util.NUnitProject.LoadProject (System.String path) in /private/tmp/mono20151006-19632-tqpley/mono-4.2.0/mcs/nunit24/ClientUtilities/util/NUnitProject.cs:line 161
     at NUnit.ConsoleRunner.ConsoleUi.MakeRunnerFromCommandLine (NUnit.ConsoleRunner.ConsoleOptions options) in /private/tmp/mono20151006-19632-tqpley/mono-4.2.0/mcs/nunit24/ConsoleRunner/nunit-console/ConsoleUi.cs:line 214
     at NUnit.ConsoleRunner.ConsoleUi.Execute (NUnit.ConsoleRunner.ConsoleOptions options) in /private/tmp/mono20151006-19632-tqpley/mono-4.2.0/mcs/nunit24/ConsoleRunner/nunit-console/ConsoleUi.cs:line 58
     at NUnit.ConsoleRunner.Runner.Main (System.String[] args) in /private/tmp/mono20151006-19632-tqpley/mono-4.2.0/mcs/nunit24/ConsoleRunner/nunit-console/Runner.cs:line 63
  </code></pre>
  
  <p>Note: if I execute <code>nunit-console hiptest.publisher.samples.dll</code> it works like a charm.</p>
  
  <p>My guess is that NUnit expects the .csproj file to tell what is the test target. I tried to add an AssemblyName group under a PropertyGroup but it did not make any difference.</p>
  
  <p>And the big problem is that I can't find any doc on what is expected from the .csproj content by Nunit (I mainly find examples where everything is done via VS or using MSBuild community tasks, which sounds really nice but apparently does not play nice with my environment (Mono, OS X and a different NUnit package than the one released with Mono (not on that project, on another one using Specflow but if I can fix it for this one it should be fixed for the second one)).</p>
  
  <p>Thanks in advance,
  Vincent</p>