I have solution with projects. Also I have in solution directory folder with msbuild files.
In msbuild file I have next code :
<PropertyGroup Label="Build Directories">
<RootPath>$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)'))</RootPath>
</PropertyGroup>
<ItemGroup>
<MSBuildProjectInfrastructure Include="$(RootPath)MyApp.Services.Infrastructure.sln">
<AdditionalProperties>Configuration=$(Configuration);Platform=$(Platform);</AdditionalProperties>
</MSBuildProjectInfrastructure>
</ItemGroup>
Which works badly, as I need to go in parent directory to find MyApp.Services.Infrastructure.sln
Structure :
SolutionFolder
-- MsBuildsFolder
-- ProjectFile
Here is quite similar question, but doesn't resolve my issue