-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
Copy pathmergedrunner.targets
22 lines (19 loc) · 1.62 KB
/
mergedrunner.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<Project>
<Target Name="_ValidateNoTestProjectsDroppedByConflictResolution" AfterTargets="ResolveReferences">
<MSBuild Projects="@(ProjectReference)" Targets="GetProjectsWithDisabledBuild" SkipNonexistentTargets="true">
<Output TaskParameter="TargetOutputs" ItemName="_ReferenceWithDisabledBuild" />
</MSBuild>
<ItemGroup>
<_ProjectReferencesUsedByReferencePaths Include="@(ReferencePath->Metadata('ProjectReferenceOriginalItemSpec'))" />
<_ProjectAssemblyReferences Include="@(ProjectReference)" Condition="'%(ProjectReference.OutputItemType)' == ''" />
<_ProjectAssemblyReferences Remove="@(_ReferenceWithDisabledBuild->Metadata('OriginalItemSpec'))" />
<_ProjectReferencesRemovedDueToConflictResolution Include="@(_ProjectAssemblyReferences)" Exclude="@(_ProjectReferencesUsedByReferencePaths)" />
</ItemGroup>
<!--
Produce an error if any project references were removed due to conflict resolution.
If a ProjectReference is removed due to conflict resolution, then we're likely losing test coverage as it's probably a test that has the same assembly name and version as another test.
-->
<Error Text="@(_ProjectReferencesRemovedDueToConflictResolution->'This project has an assembly name identical to another project, if this CoreCLRTestLibrary, you should reference %24(TestLibraryProjectPath) instead of constructing the path yourself: %(FullPath)', '
')" Condition="'@(_ProjectReferencesRemovedDueToConflictResolution)' != ''" />
</Target>
<Import Project="$(RepoRoot)/src/tests/Common/mergedrunnermobile.targets" Condition="'$(TargetsMobile)' == 'true'" />
</Project>