2016-04-21 16:40:25 +03:00
|
|
|
<!--
|
|
|
|
***********************************************************************************************
|
|
|
|
Xamarin.WatchOS.AppExtension.Common.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-2016 Xamarin. All rights reserved.
|
|
|
|
***********************************************************************************************
|
|
|
|
-->
|
|
|
|
|
|
|
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
|
|
<PropertyGroup>
|
|
|
|
<IsAppExtension>True</IsAppExtension>
|
2016-10-03 20:44:31 +03:00
|
|
|
<IsWatchExtension>True</IsWatchExtension>
|
2018-10-25 03:11:17 +03:00
|
|
|
<IOSDebugOverWiFi>True</IOSDebugOverWiFi>
|
2016-12-18 06:51:25 +03:00
|
|
|
<AppBundleExtension>.appex</AppBundleExtension>
|
2016-09-22 15:29:18 +03:00
|
|
|
<MtouchHttpClientHandler Condition="'$(MtouchHttpClientHandler)' == ''">NSUrlSessionHandler</MtouchHttpClientHandler>
|
[msbuild] Set 'CopyNuGetImplementations' to true for app extensions. Fixes #4235 and #4237. (#4512)
* [msbuild] Set 'CopyNuGetImplementations' to true for app extensions. Fixes #4235 and #4237.
In Xamarin.iOS.Common.targets, just before the _CompileToNative target, we
modify the mtouch references to ensure that we get the lib assemblies for
nugets, and not the ref references:
https://github.com/xamarin/xamarin-macios/blob/9e31d07ecc08a64372dd562e843c3d8950d24985/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets#L784-L791
This logic removes nuget references, and then re-adds any copy-local dll
references.
This works fine in executable projects, but not in library projects (aka
extensions), because nugets aren't copied for library projects:
https://github.com/NuGet/NuGet.BuildTasks/blob/cf4b0a12cf1f75e0654f28c2a9020251c41d126a/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets#L86
So we need to set the CopyNuGetImplementations variable to 'true' for our
library projects.
Fixes https://github.com/xamarin/xamarin-macios/issues/4235.
Fixes https://github.com/xamarin/xamarin-macios/issues/4237.
* [tests] Redirect MSBuildExtensionsPath to MSBuildExtensionsPathFallbackPathsOverride when running msbuild for package reference tests.
This fixes a problem where nuget restore would fail for projects with
PackageReferences, because a variable would be empty and msbould would try to
write to /:
nuget restore ../MyAppWithPackageReference/MyAppWithPackageReference.csproj
MSBuild auto-detection: using msbuild version '15.0' from '/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/'.
Restoring packages for /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/msbuild/tests/MyAppWithPackageReference/MyAppWithPackageReference.csproj...
Committing restore...
Generating MSBuild file /MyAppWithPackageReference.csproj.nuget.g.props.
Path / is a directory
This will become unnecessary when PR #4111 is merged.
* Add Xamarin.Mac test showing that fix is not needed (?!?)
* Add AppExtension test with packagereference
* Make extension actually have json code generated
* Fix ProjectTypeGuids of checked in extension projects, as they were not openable in VSfM
* XM extension test now correctly fails
* Now that we have a failing test, fix XM same as rest of platforms
* Disable XM tests due to msbuild redirect sadness
* Disable iOS tests as well due to #4110
* Disable iOS tests by using the Ignore attribute.
Disable tests by using the Ignore attribute, because just commenting out the
TestCase attributes makes the test fail:
1) NotRunnable : Xamarin.iOS.Tasks.ProjectReferenceTests.BasicTest
No suitable constructor was found
2018-08-20 14:43:48 +03:00
|
|
|
|
|
|
|
<!-- This must be set before importing Microsoft.CSharp.targets -->
|
|
|
|
<!-- See Xamarin.iOS.AppExtension.CSharp.targets for a detailed explanation of this variable -->
|
|
|
|
<CopyNuGetImplementations Condition="'$(CopyNuGetImplementations)' == ''">true</CopyNuGetImplementations>
|
2018-10-09 20:27:04 +03:00
|
|
|
|
2018-10-11 03:14:31 +03:00
|
|
|
<!-- Enable nuget package conflict resolution -->
|
|
|
|
<ResolveAssemblyConflicts>true</ResolveAssemblyConflicts>
|
2019-01-29 10:14:26 +03:00
|
|
|
<UseFakeWatchOS4_3Sdk Condition="'$(UseFakeWatchOS4_3Sdk)' == ''">False</UseFakeWatchOS4_3Sdk>
|
2016-04-21 16:40:25 +03:00
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<Import Project="$(MSBuildThisFileDirectory)..\iOS\Xamarin.iOS.Common.targets" />
|
|
|
|
|
|
|
|
<Import Project="$(MSBuildThisFileDirectory)Xamarin.WatchOS.AppExtension.Common.props"
|
|
|
|
Condition="'$(_XamarinWatchOSAppExtensionCommonPropsHasBeenImported)' != 'true'" />
|
|
|
|
|
|
|
|
<Import Project="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.targets"
|
|
|
|
Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.targets')"/>
|
|
|
|
|
|
|
|
<!-- Override GetTargetPath, Build, and Rebuild -->
|
|
|
|
<Target Name="GetBundleTargetPath" DependsOnTargets="_GenerateBundleName;$(GetTargetPathDependsOn)" Outputs="@(_AppExtensionBundlePath)" />
|
|
|
|
<Target Name="Build" Condition="'$(_InvalidConfigurationWarning)' != 'true'" DependsOnTargets="_GenerateBundleName;$(BuildDependsOn)" Outputs="@(_AppExtensionBundlePath)" />
|
|
|
|
<Target Name="Rebuild" Condition="'$(_InvalidConfigurationWarning)' != 'true'" DependsOnTargets="_GenerateBundleName;$(RebuildDependsOn)" Outputs="@(_AppExtensionBundlePath)" />
|
|
|
|
|
|
|
|
<Target Name="_GenerateBundleName" DependsOnTargets="_ComputeTargetArchitectures;_DetectSigningIdentity">
|
|
|
|
<PropertyGroup>
|
2016-12-18 06:51:25 +03:00
|
|
|
<AppBundleDir Condition="'$(AppBundleDir)' == ''">$(DeviceSpecificOutputPath)$(_AppBundleName)$(AppBundleExtension)</AppBundleDir>
|
2016-04-21 16:40:25 +03:00
|
|
|
<_AppBundlePath>$(AppBundleDir)\</_AppBundlePath>
|
|
|
|
|
|
|
|
<!-- needed for GetTargetPath/Build/Rebuild task outputs -->
|
|
|
|
<_AppExtensionBundlePath>$(MSBuildProjectDirectory)\$(AppBundleDir)</_AppExtensionBundlePath>
|
|
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
|
|
<_AppExtensionBundlePath Include="$(MSBuildProjectDirectory)\$(AppBundleDir)">
|
|
|
|
<!-- We need this metadata to fix the source in VS -->
|
|
|
|
<BuildSessionId>$(BuildSessionId)</BuildSessionId>
|
|
|
|
<BuildServerPath>..\..\$(BuildAppName)\$(BuildSessionId)\$(AppBundleDir)</BuildServerPath>
|
|
|
|
</_AppExtensionBundlePath>
|
|
|
|
</ItemGroup>
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="CreateIpa"/>
|
|
|
|
|
|
|
|
<Import Project="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).After.targets"
|
|
|
|
Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildThisFileName).After.targets')"/>
|
|
|
|
|
|
|
|
</Project>
|