27 lines
1.1 KiB
Plaintext
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(ResolveMatchingContract)' == 'true'">
<ResolveReferencesDependsOn>
ResolveMatchingContract;
$(ResolveReferencesDependsOn)
</ResolveReferencesDependsOn>
<CleanDependsOn>
ResolveMatchingContract;
$(CleanDependsOn);
</CleanDependsOn>
</PropertyGroup>
<Target Name="ResolveMatchingContract">
<PropertyGroup>
<HasMatchingContract Condition="'$(HasMatchingContract)' == '' and Exists('$(SourceDir)/$(AssemblyName)/ref')">true</HasMatchingContract>
</PropertyGroup>
<ItemGroup Condition="'$(HasMatchingContract)' == 'true'">
<ResolvedMatchingContract Include="$(ContractOutputPath)/$(MSBuildProjectName).dll" />
</ItemGroup>
<Error Condition="'$(HasMatchingContract)' == 'true' and !Exists('%(ResolvedMatchingContract.Identity)')" Text="ResolveMatchingContract could not find a matching contract '%(ResolvedMatchingContract.Identity)' not found." />
</Target>
</Project>