<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <TargetFramework>$(CliTargetFramework)</TargetFramework>
    <RuntimeFrameworkVersion>$(MicrosoftNETCoreAppPackageVersion)</RuntimeFrameworkVersion>
    <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
    <AssemblyName>msbuild.IntegrationTests</AssemblyName>
    <AssetTargetFallback>$(AssetTargetFallback);dotnet5.4;portable-net451+win8</AssetTargetFallback>
  </PropertyGroup>

  <ItemGroup>
    <ProjectReference Include="..\Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.csproj" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
    <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
    <PackageReference Include="xunit" Version="2.2.0" />
  </ItemGroup>

  <Target Name="CreateDotnetToolsTestAsset" AfterTargets="Build">

    <PropertyGroup>
      <testAssetSourceRoot>$(OutputPath)/TestDotnetToolsLayoutDirectory</testAssetSourceRoot>
    </PropertyGroup>

    <ItemGroup>
      <TestDotnetTools Include="$(RepoRoot)/build/BundledDotnetTools.proj">
        <Properties>
          DotnetToolsLayoutDirectory=$(SdkOutputDirectory)/DotnetTools;
          TemplateFillInPackageName=%(BundledDotnetTools.Identity);
          TemplateFillInPackageVersion=%(BundledDotnetTools.Version);
          PreviousStageDirectory=$(PreviousStageDirectory);
          DotnetToolsLayoutDirectory=$(testAssetSourceRoot)
        </Properties>
      </TestDotnetTools>
    </ItemGroup>
    <MSBuild BuildInParallel="False" Projects="@(TestDotnetTools)" />
  </Target>
</Project>
