title: Get parent directory of MSBuildProjectDirectory
body: <p>I have solution with projects. Also I have in solution directory folder with msbuild files. </p>
  
  <p>In msbuild file I have next code :</p>
  
  <pre><code>&lt;PropertyGroup Label="Build Directories"&gt;
     &lt;RootPath&gt;$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)'))&lt;/RootPath&gt;
  &lt;/PropertyGroup&gt;
  
  &lt;ItemGroup&gt;
     &lt;MSBuildProjectInfrastructure Include="$(RootPath)MyApp.Services.Infrastructure.sln"&gt;
     &lt;AdditionalProperties&gt;Configuration=$(Configuration);Platform=$(Platform);&lt;/AdditionalProperties&gt;
     &lt;/MSBuildProjectInfrastructure&gt;
   &lt;/ItemGroup&gt;
  </code></pre>
  
  <p>Which works badly, as I need to go in parent directory to find <code>MyApp.Services.Infrastructure.sln</code></p>
  
  <p>Structure :</p>
  
  <pre><code>SolutionFolder
  
   -- MsBuildsFolder
  
   -- ProjectFile
  </code></pre>
  
  <hr>
  
  <p>Here is <a href="https://stackoverflow.com/questions/2418874/how-can-i-get-the-path-of-the-current-msbuild-file">quite similar question</a>, but doesn't resolve my issue</p>