Merge pull request #23052 from CarolEidt/Fix22850
[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   <!-- Override the AddDesignTimeFacadeReferences target to add the ability to reference System.Private.CoreLib.
7        Some tests use functionality not available in the portable reference assemblies.
8        For portability reasons it's generally a good idea to reference the facades instead of the
9        raw implementation assemblies.  However, these tests are useful. -->
10   <Target Name="AddDesignTimeFacadeReferences"
11       Condition="'$(ReferenceSystemPrivateCoreLib)' == 'true'"
12       BeforeTargets="ResolveReferences"
13       DependsOnTargets="GetReferenceAssemblyPaths"
14   >
15
16     <ItemGroup>
17       <ReferencePath Include="$(ProjectDir)\..\bin\Product\$(BuildOS).$(BuildArch).$(BuildType)\System.Private.CoreLib.dll" />
18     </ItemGroup>
19   </Target>
20
21   <!-- Remove package references when referencing System.Private.CoreLib from SDK style project --> 
22   <Target Name="CleanResolvedCompileFileDefinitions"  AfterTargets="ResolvePackageAssets" Condition="'$(ReferenceSystemPrivateCoreLib)' == 'true' and '$(UsingMicrosoftNETSdk)' == 'true'" >
23     <ItemGroup>
24       <ResolvedCompileFileDefinitions Remove="@(ResolvedCompileFileDefinitions)" />
25     </ItemGroup>
26   </Target>
27   
28   <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
29     <!--
30       Allow this project to setup the default target frameworks. Note this depends on the targeting packs that VS
31       installs to resolve mscorlib and System. That should be fixed in the future.
32       -->
33     <_TargetFrameworkDirectories></_TargetFrameworkDirectories>
34     <_FullFrameworkReferenceAssemblyPaths></_FullFrameworkReferenceAssemblyPaths>
35   </PropertyGroup>
36 </Project>