66 строки
3.7 KiB
XML
66 строки
3.7 KiB
XML
<!--
|
|
***********************************************************************************************
|
|
Xamarin.Mac.XM45.xbuild.targets
|
|
|
|
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
|
|
created a backup copy. Incorrect changes to this file will make it
|
|
impossible to load or build your projects from the command-line or the IDE.
|
|
|
|
This file imports the version- and platform-specific targets for the project importing
|
|
this file. This file also defines targets to produce an error if the specified targets
|
|
file does not exist, but the project is built anyway (command-line or IDE build).
|
|
|
|
Copyright (C) 2015 Xamarin Inc. All rights reserved.
|
|
***********************************************************************************************
|
|
-->
|
|
|
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
|
|
<!-- The XM 4.5 target framework (also called Full) is a bit of a strange case -->
|
|
<!-- It does not declare a TargetFrameworkIdentifier so it can be compatible with "Desktop" nugets -->
|
|
<!-- These days it could have been done with some patches to nuget and such, but now can not be changed -->
|
|
<!-- without breaking some number of user projects (forward only mutation is rather unacceptable here) -->
|
|
<!-- So this file uses some hacks to force xbuild/msbuild to resolve to the BCL/mscorlib/Facades -->
|
|
<!-- we keep inside Xamarin.Mac's framework and not the system mono ones. System mono is not -->
|
|
<!-- necessarily in sync with ours and is not safe to depend upon -->
|
|
|
|
<!-- XBuild specific hacks - Msbuild are in Xamarin.Mac.msbuild.targets and not XM 4.5 (Full) specific -->
|
|
|
|
<!-- TargetFrameworkDirectory needs to point to ours, and FrameworkPathOverride does not work in xbuild, so we must override. -->
|
|
<Target Name="GetFrameworkPaths"
|
|
Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'"
|
|
DependsOnTargets="$(GetFrameworkPathsDependsOn)">
|
|
<CreateProperty Value="$(XamarinMacFrameworkRoot)/lib/mono/4.5/">
|
|
<Output TaskParameter="Value" PropertyName="TargetFrameworkDirectory"/>
|
|
</CreateProperty>
|
|
</Target>
|
|
|
|
<!-- We only need to extend GetReferenceAssemblyPaths slightly, so we can force facades to only comes from our copy -->
|
|
<!-- but there is no invoking of a base target in msbuild. Copied from Microsoft.Common.targets with small changes -->
|
|
<Target Name="GetReferenceAssemblyPaths"
|
|
Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'"
|
|
DependsOnTargets="$(GetReferenceAssemblyPathsDependsOn)">
|
|
|
|
<ItemGroup Condition="'$(ImplicitlyExpandDesignTimeFacades)' == 'true'">
|
|
<DesignTimeFacadeDirectoryRoots Include="$(TargetFrameworkDirectory)" />
|
|
<DesignTimeFacadeDirectories Include="%(DesignTimeFacadeDirectoryRoots.Identity)\Facades\" Condition="Exists('%(DesignTimeFacadeDirectoryRoots.Identity)\Facades\')" />
|
|
<_DesignTimeFacadeAssemblies Include="%(DesignTimeFacadeDirectories.Identity)\*.dll"/>
|
|
</ItemGroup>
|
|
|
|
<PropertyGroup Condition="'@(DesignTimeFacadeDirectories)' != ''">
|
|
<TargetFrameworkDirectory>$(TargetFrameworkDirectory);@(DesignTimeFacadeDirectories)</TargetFrameworkDirectory>
|
|
</PropertyGroup>
|
|
</Target>
|
|
|
|
<!-- This lets us bypass the standard MSBuild resolution of mscorlib, which always picks an incompatible system copy. -->
|
|
<Target Name="_AddCorlibReference"
|
|
Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'"
|
|
DependsOnTargets="GetReferenceAssemblyPaths">
|
|
<ItemGroup>
|
|
<_ExplicitReference Include="$(XamarinMacFrameworkRoot)/lib/mono/4.5/mscorlib.dll">
|
|
<Private>false</Private>
|
|
</_ExplicitReference>
|
|
</ItemGroup>
|
|
</Target>
|
|
</Project>
|