Building msbuild 15 project programmatically : 

<p>I'm trying to build a simple C# 7 class library project created with VS2017. </p>

<p>MSBuild from framework assemblies is outdated, so I'm referencing <code>Microsoft.Build</code>, <code>Microsoft.Build.Engine</code> and <code>Microsoft.Build.Framework</code> from MSBuild folder within visual studio (<code>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin</code>).</p>

<p>Still, when I do this:</p>

<pre class="lang-cs prettyprint-override"><code>using (var collection = new ProjectCollection())
{
    var proj = collection.LoadProject(@"c:\projects\Sample\Sample.csproj"); // &lt;-- exception
    proj.Build(new[] {new ConsoleLogger()});
}
</code></pre>

<p>I'm getting <code>InvalidProjectFileException: The tools version "15.0" is unrecognized. Available tools versions are "4.0", "2.0".</code></p>

<p>Is there programmatic way to invoke build using the latest build tools and C# 7 compiler?</p>
