File: Microsoft.Build.Engine.UnitTests.csproj
Web Access
Project: ..\..\..\src\Build.UnitTests\Microsoft.Build.Engine.UnitTests.csproj (Microsoft.Build.Engine.UnitTests)
<Project Sdk="Microsoft.NET.Sdk">
 
  <PropertyGroup>
    <TargetFrameworks>$(RuntimeOutputTargetFrameworks)</TargetFrameworks>
    <PlatformTarget>$(RuntimeOutputPlatformTarget)</PlatformTarget>
    <IsPackable>false</IsPackable>
    <AssemblyName>Microsoft.Build.Engine.UnitTests</AssemblyName>
 
    <DefineConstants>$(DefineConstants);MICROSOFT_BUILD_ENGINE_UNITTESTS</DefineConstants>
 
    <!-- Define a constant so we can skip tests that require MSBuildTaskHost -->
    <DefineConstants Condition="'$(MSBuildRuntimeType)' == 'Core'">$(DefineConstants);NO_MSBUILDTASKHOST</DefineConstants>
 
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
  </PropertyGroup>
 
  <ItemGroup>
    <Reference Include="System.IO.Compression" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
    <PackageReference Include="FluentAssertions" />
    <PackageReference Include="System.Configuration.ConfigurationManager" />
    <PackageReference Include="Shouldly" />
    <PackageReference Include="FakeItEasy" />
    <PackageReference Include="System.Net.Http" />
    <PackageReference Include="Microsoft.CodeAnalysis.Build.Tasks" />
    <PackageReference Include="NuGet.Frameworks">
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
 
    <ProjectReference Include="..\Build\Microsoft.Build.csproj" />
    <ProjectReference Include="..\Framework\Microsoft.Build.Framework.csproj" />
    <ProjectReference Include="..\MSBuild\MSBuild.csproj" />
    <ProjectReference Include="..\MSBuildTaskHost\MSBuildTaskHost.csproj" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" Aliases="MSBuildTaskHost" />
    <ProjectReference Include="..\Tasks\Microsoft.Build.Tasks.csproj" />
    <ProjectReference Include="..\Utilities\Microsoft.Build.Utilities.csproj" />
    <ProjectReference Include="..\Xunit.NetCore.Extensions\Xunit.NetCore.Extensions.csproj" />
    <ProjectReference Include="..\UnitTests.Shared\Microsoft.Build.UnitTests.Shared.csproj" />
 
    <ProjectReference Include="..\Samples\TaskWithDependency\TaskWithDependency.csproj" Private="false" ReferenceOutputAssembly="false" OutputItemType="TaskWithDependencyResolvedProjectReferencePath">
      <SetTargetFramework Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">TargetFramework=$(FullFrameworkTFM)</SetTargetFramework>
      <SetTargetFramework Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">TargetFramework=$(LatestDotNetCoreForMSBuild)</SetTargetFramework>
    </ProjectReference>
    <ProjectReference Include="..\Samples\PortableTask\PortableTask.csproj" Private="false" ReferenceOutputAssembly="false" OutputItemType="PortableTaskResolvedProjectReferencePath" />
 
    <ProjectReference Include="..\Samples\ProjectCachePlugin\ProjectCachePlugin.csproj" Private="false" ReferenceOutputAssembly="false">
      <SetTargetFramework Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">TargetFramework=$(FullFrameworkTFM)</SetTargetFramework>
      <SetTargetFramework Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">TargetFramework=$(LatestDotNetCoreForMSBuild)</SetTargetFramework>
    </ProjectReference>
 
    <Reference Include="System.IO.Compression" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' " />
  </ItemGroup>
 
  <ItemGroup>
    <Compile Include="..\Shared\UnitTests\CommunicationUtilities_Tests.cs" />
    <Compile Include="..\Shared\UnitTests\EscapingUtilities_Tests.cs" />
    <Compile Include="..\Shared\UnitTests\ErrorUtilities_Tests.cs" />
    <Compile Include="..\Shared\UnitTests\PrintLineDebugger_Tests.cs" />
    <Compile Include="..\Shared\UnitTests\FileUtilities_Tests.cs" />
    <Compile Include="..\Shared\UnitTests\FileMatcher_Tests.cs" />
    <Compile Include="..\Shared\UnitTests\ResourceUtilities_Tests.cs" />
    <Compile Include="..\Shared\UnitTests\TypeLoader_Tests.cs" />
    <Compile Include="..\Shared\UnitTests\TypeLoader_Dependencies_Tests.cs" />
    <Compile Include="..\Shared\UnitTests\XmakeAttributes_Tests.cs">
      <Link>XmakeAttributes_Tests.cs</Link>
    </Compile>
    <Compile Include="..\Shared\UnitTests\XmlUtilities_Tests.cs" />
    <Compile Include="..\Shared\UnitTests\AssemblyNameEx_Tests.cs">
      <Link>AssemblyNameEx_Tests.cs</Link>
    </Compile>
    <Compile Include="..\Shared\UnitTests\TaskParameter_Tests.cs">
      <Link>TaskParameter_Tests.cs</Link>
    </Compile>
    <Compile Include="..\Shared\UnitTests\CopyOnWriteDictionary_Tests.cs">
      <Link>Collections\CopyOnWriteDictionary_Tests.cs</Link>
    </Compile>
    <Compile Include="..\Shared\UnitTests\ImmutableDictionary_Tests.cs" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(MSBuildRuntimeType)' == 'Full'">
      <Link>Collections\ImmutableDictionary_Tests.cs</Link>
    </Compile>
 
    <None Include="..\Shared\UnitTests\App.config">
      <Link>App.config</Link>
      <SubType>Designer</SubType>
    </None>
    <None Include="..\Shared\UnitTests\xunit.runner.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
  </ItemGroup>
 
  <Target Name="CopyTestProjects" AfterTargets="ResolveProjectReferences">
    <!-- In TypeLoader, the following logic is used for loading assemblies on .NET Core:
            - if the simple name of the assembly exists in the same folder as msbuild.exe, then that assembly gets loaded, indifferent of the user specified path
            - otherwise, the assembly from the user specified path is loaded, if it exists.
 
          So the custom tasks we are testing can't be in test output folder, because on .NET Core that would affect the loading behavior.  So this
          target puts them in subfolders of the test output folder instead.
    -->
 
    <Error Condition="'@(PortableTaskResolvedProjectReferencePath)' == ''" Text="Couldn't find PortableTaskResolvedProjectReferencePath item for PortableTask" />
    <Error Condition="'@(TaskWithDependencyResolvedProjectReferencePath)' == ''" Text="Couldn't find TaskWithDependencyResolvedProjectReferencePath item for TaskWithDependency" />
 
    <PropertyGroup>
      <PortableTaskOutputPath>@(PortableTaskResolvedProjectReferencePath->'%(RootDir)%(Directory)')</PortableTaskOutputPath>
      <TaskWithDependencyOutputPath>@(TaskWithDependencyResolvedProjectReferencePath->'%(RootDir)%(Directory)')</TaskWithDependencyOutputPath>
    </PropertyGroup>
    <ItemGroup>
      <PortableTaskContent Include="$(PortableTaskOutputPath)*.*" />
      <Content Include="@(PortableTaskContent)" Link="PortableTask\%(PortableTaskContent.Filename)%(PortableTaskContent.Extension)" CopyToOutputDirectory="PreserveNewest" />
 
      <TaskWithDependencyContentContent Include="$(TaskWithDependencyOutputPath)*.*" />
      <Content Include="@(TaskWithDependencyContentContent)" Link="TaskWithDependency\%(TaskWithDependencyContentContent.Filename)%(TaskWithDependencyContentContent.Extension)" CopyToOutputDirectory="PreserveNewest" />
    </ItemGroup>
 
  </Target>
 
  <ItemDefinitionGroup>
    <Content>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemDefinitionGroup>
 
  <ItemGroup>
    <Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
  </ItemGroup>
</Project>