summaryrefslogtreecommitdiff
path: root/tests/override.targets
diff options
context:
space:
mode:
Diffstat (limited to 'tests/override.targets')
-rw-r--r--tests/override.targets33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/override.targets b/tests/override.targets
new file mode 100644
index 0000000000..71a8b1f4f5
--- /dev/null
+++ b/tests/override.targets
@@ -0,0 +1,33 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <!--
+ Overrides for all other targets (including build tools) can go in this file.
+ -->
+
+ <Import Project="mono.targets" Condition="'$(OsEnvironment)'=='Unix'" />
+ <Import Project="roslyn.xplat.targets" Condition="'$(OsEnvironment)'=='Unix' and '$(UseRoslynCompiler)'=='true'" />
+ <!-- Contains overrides for the nuget reference resolution. The regular nuget reference resolution will not
+ copy references local, which we need in order to correctly execute the xunit project -->
+ <Import Project="xunitwrapper.targets" Condition="'$(IsXunitWrapperProject)'=='true'" />
+
+ <!-- Override the AddDesignTimeFacadeReferences target to add the ability to reference the local version of mscorlib.
+ Some tests use functionality not available in the portable reference assemblies.
+ For portability reasons it's generally a good idea to reference the facades instead of the
+ raw implementation assemblies. However, these tests are useful. -->
+ <Target Name="AddDesignTimeFacadeReferences"
+ Condition="'$(TargetingDefaultPlatform)' == 'true'"
+ BeforeTargets="ResolveReferences"
+ DependsOnTargets="GetReferenceAssemblyPaths"
+ >
+ <PropertyGroup>
+ <_resolvedMscorlib Condition="'%(ReferencePath.FileName)' == 'mscorlib'">true</_resolvedMscorlib>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PossibleTargetFrameworks Include="$(_TargetFrameworkDirectories)" />
+ <ReferencePath Include="%(PossibleTargetFrameworks.Identity)mscorlib.dll"
+ Condition="'$(ReferenceLocalMscorlib)' != 'true' and '$(_resolvedMscorlib)' != 'true' and '%(PossibleTargetFrameworks.Identity)' != '' and Exists('%(PossibleTargetFrameworks.Identity)mscorlib.dll')" />
+ <ReferencePath Include="$(ProjectDir)\..\bin\Product\$(BuildOS).$(BuildArch).$(BuildType)\mscorlib.dll"
+ Condition="'$(ReferenceLocalMscorlib)' == 'true' and '$(_resolvedMscorlib)' != 'true'" />
+ </ItemGroup>
+ </Target>
+</Project>