Merge pull request #4134 from MichalStrehovsky/junkAttributes
[platform/upstream/coreclr.git] / tests / override.targets
1 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2   <!--
3     Overrides for all other targets (including build tools) can go in this file.
4   -->
5
6   <Import Project="mono.targets" Condition="'$(OsEnvironment)'=='Unix'" />
7   <Import Project="roslyn.xplat.targets" Condition="'$(OsEnvironment)'=='Unix'" />
8   <!-- Contains overrides for the nuget reference resolution.  The regular nuget reference resolution will not 
9        copy references local, which we need in order to correctly execute the xunit project -->
10   <Import Project="xunitwrapper.targets" Condition="'$(IsXunitWrapperProject)'=='true'" />
11   
12   <!-- Override the AddDesignTimeFacadeReferences target to add the ability to reference the local version of mscorlib.
13        Some tests use functionality not available in the portable reference assemblies.
14        For portability reasons it's generally a good idea to reference the facades instead of the 
15        raw implementation assemblies.  However, these tests are useful. -->
16   <Target Name="AddDesignTimeFacadeReferences"
17       Condition="'$(TargetingDefaultPlatform)' == 'true'"
18       BeforeTargets="ResolveReferences"
19       DependsOnTargets="GetReferenceAssemblyPaths"
20   >
21     <PropertyGroup>
22       <_resolvedMscorlib Condition="'%(ReferencePath.FileName)' == 'mscorlib'">true</_resolvedMscorlib>
23     </PropertyGroup>
24
25     <ItemGroup>
26       <PossibleTargetFrameworks Include="$(_TargetFrameworkDirectories)" />
27       <ReferencePath Include="%(PossibleTargetFrameworks.Identity)mscorlib.dll" 
28                      Condition="'$(ReferenceLocalMscorlib)' != 'true' and '$(_resolvedMscorlib)' != 'true' and '%(PossibleTargetFrameworks.Identity)' != '' and Exists('%(PossibleTargetFrameworks.Identity)mscorlib.dll')" />
29       <ReferencePath Include="$(ProjectDir)\..\bin\Product\$(BuildOS).$(BuildArch).$(BuildType)\mscorlib.dll" 
30                      Condition="'$(ReferenceLocalMscorlib)' == 'true' and '$(_resolvedMscorlib)' != 'true'" />
31     </ItemGroup>
32   </Target>
33 </Project>