|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- Don't build a netfx version of this unit with dotnet, as the netfx bootstrap layout created with 'dotnet build' is incomplete. -->
<TargetFrameworks>$(LatestDotNetCoreForMSBuild)</TargetFrameworks>
<TargetFrameworks Condition="'$(MSBuildRuntimeType)' == 'Full'">$(FullFrameworkTFM);$(TargetFrameworks)</TargetFrameworks>
<PlatformTarget>$(RuntimeOutputPlatformTarget)</PlatformTarget>
<IsPackable>false</IsPackable>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Build\Microsoft.Build.csproj" />
<ProjectReference Include="..\Tasks\Microsoft.Build.Tasks.csproj" />
<ProjectReference Include="..\UnitTests.Shared\Microsoft.Build.UnitTests.Shared.csproj" />
<ProjectReference Include="..\Xunit.NetCore.Extensions\Xunit.NetCore.Extensions.csproj" />
</ItemGroup>
<ItemGroup Label="TestAssests">
<ProjectReference Include=".\TestAssets\CustomCheck\CustomCheck.csproj" />
<ProjectReference Include=".\TestAssets\CustomCheck2\CustomCheck2.csproj" />
<ProjectReference Include=".\TestAssets\InvalidCustomCheck\InvalidCustomCheck.csproj" />
<ProjectReference Include=".\TestAssets\ErrorCustomCheck\ErrorCustomCheck.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Collections.Immutable" />
<PackageReference Include="Shouldly" />
<PackageReference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<ItemGroup>
<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>
<None Include="TestAssets\**\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Shared\IsExternalInit.cs" />
</ItemGroup>
<Target Name="AddGeneratedFile" BeforeTargets="BeforeCompile;CoreCompile" Inputs="$(MSBuildAllProjects)" Outputs="$(IntermediateOutputPath)BuildCheckUnitTestsConstants.cs">
<PropertyGroup>
<GeneratedText>
<![CDATA[
namespace Microsoft.Build.BuildCheck.UnitTests
{
internal sealed class BuildCheckUnitTestsConstants
{
public const string MicrosoftBuildPackageVersion = @"$(Version)"%3B
public const string RepoRoot = @"$(RepoRoot)"%3B
}
}
]]>
</GeneratedText>
<GeneratedFilePath>$(IntermediateOutputPath)BuildCheckUnitTestsConstants.cs</GeneratedFilePath>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(GeneratedFilePath)" />
<FileWrites Include="$(GeneratedFilePath)" />
</ItemGroup>
<WriteLinesToFile Lines="$(GeneratedText)" File="$(GeneratedFilePath)" WriteOnlyWhenDifferent="true" Overwrite="true" />
</Target>
</Project>
|