title: Migrate Microsoft.Build.BuildEngine.Engine to Microsoft.Build.Evaluation.ProjectCollection
body: <p>after Microsoft marked the BuildEngine.Engine and BuildEngine.Project as obsolete i have tried to use the new proposal from Microsoft how you can see it underneath. But i have no idea where i can integrate the xmlprojectfile. Is here someone who knows the solution of this problem?</p>
  
  <p><strong>The XML project file content</strong></p>
  
  <pre><code>&lt;Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
    &lt;ItemGroup&gt;
      &lt;ProjectToBuild Include ="myproject.csproj" /&gt;
    &lt;/ItemGroup&gt;  
    &lt;Target Name="Build"&gt;
      &lt;MSBuild Projects="@(ProjectToBuild)"
        Properties="Configuration=Debug" StopOnFirstFailure="true" /&gt;
    &lt;/Target&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p><strong>The old and working version (but obsolete)</strong></p>
  
  <pre><code>Microsoft.Build.BuildEngine.Engine engine = new Microsoft.Build.BuildEngine.Engine();
  engine.DefaultToolsVersion = "4.0";
  engine.RegisterLogger(new ConsoleLogger());
  Microsoft.Build.BuildEngine.Project project = new Microsoft.Build.BuildEngine.Project(engine);
  project.Load(xmlprojectfile);
  if (!project.Build())
  {
      Console.ReadLine();
  }
  </code></pre>
  
  <p><strong>The new not working verison</strong></p>
  
  <pre><code>Microsoft.Build.Evaluation.ProjectCollection collection = new Microsoft.Build.Evaluation.ProjectCollection();
  collection.DefaultToolsVersion = "4.0";
  collection.RegisterLogger(new ConsoleLogger());
  Microsoft.Build.Evaluation.Project project = new Microsoft.Build.Evaluation.Project(collection);
  if (!project.Build())
  {
      Console.ReadLine();
  }
  </code></pre>