[Tizen] Add CoreCLR tests BuildTools v3.1.3 for armel,arm64
[platform/upstream/coreclr.git] / Tools / resolveContract.targets
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
4   <PropertyGroup Condition="'$(ResolveMatchingContract)' == 'true'">
5     <AddProjectReferencesDynamicallyDependsOn>
6       ResolveMatchingContract;
7       $(AddProjectReferencesDynamicallyDependsOn);
8     </AddProjectReferencesDynamicallyDependsOn>
9     <ResolveReferencesDependsOn>
10       $(ResolveReferencesDependsOn);
11       VerifyMatchingContract
12     </ResolveReferencesDependsOn>
13   </PropertyGroup>
14
15   <Target Name="ResolveMatchingContract">
16     <PropertyGroup>
17       <ContractProject Condition="'$(ContractProject)' == ''">$(SourceDir)/$(MSBuildProjectName)/ref/$(MSBuildProjectName).csproj</ContractProject>
18       <HasMatchingContract Condition="'$(HasMatchingContract)' == '' and Exists('$(ContractProject)')">true</HasMatchingContract>
19       <ContractAssemblyPath Condition="'$(ContractAssemblyPath)' == ''">$(ContractOutputPath)/$(MSBuildProjectName).dll</ContractAssemblyPath>
20     </PropertyGroup>
21
22     <ItemGroup Condition="'$(HasMatchingContract)' == 'true'">
23       <ResolvedMatchingContract Condition="Exists('$(ContractAssemblyPath)')" Include="$(ContractAssemblyPath)" />
24
25       <!-- If the contract doesn't exist in the default contract output path add a project reference to the contract project to resolve -->
26       <ProjectReference Condition="'@(ResolvedMatchingContract)' == ''" Include="$(ContractProject)">
27         <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
28         <OutputItemType>ResolvedMatchingContract</OutputItemType>
29       </ProjectReference>
30     </ItemGroup>
31   </Target>
32
33   <Target Name="VerifyMatchingContract">
34     <Error Condition="'$(HasMatchingContract)' == 'true' and !Exists('%(ResolvedMatchingContract.Identity)')" Text="ResolveMatchingContract could not find a matching contract '%(ResolvedMatchingContract.Identity)' not found." />
35   </Target>
36 </Project>