Skip to content

Commit c3de9b9

Browse files
authored
[msbuild] Don't connect to a remote mac for library projects that are bundling original resources. (#22984)
Recently we added support for fully building library and binding projects on Windows, without connecting to a remote Mac. This fix makes it so that we won't connect to the Mac when it's not needed.
1 parent 4e0d3ad commit c3de9b9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Common.After.targets

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,15 @@ Copyright (C) 2011-2013 Xamarin. All rights reserved.
2424
<Import Project="$(MSBuildThisFileDirectory)Xamarin.Messaging.Build.targets" Condition="Exists('$(MSBuildThisFileDirectory)Xamarin.Messaging.Build.targets') And '$(MessagingBuildTargetsImported)' != 'true'" />
2525
<Import Project="$(MSBuildThisFileDirectory)Xamarin.iOS.Windows.After.targets" Condition="Exists('$(MSBuildThisFileDirectory)Xamarin.iOS.Windows.After.targets')" />
2626

27+
<PropertyGroup>
28+
<_RequiresMacConnection Condition="'$(_RequiresMacConnection)' == '' And '$(_CanOutputAppBundle)' == 'true'">true</_RequiresMacConnection>
29+
<_RequiresMacConnection Condition="'$(_RequiresMacConnection)' == '' And '$(_BundleOriginalResources)' != 'true'">true</_RequiresMacConnection>
30+
<_RequiresMacConnection Condition="'$(_RequiresMacConnection)' == ''">false</_RequiresMacConnection>
31+
</PropertyGroup>
32+
2733
<Target Name="EnsureMacConnection"
2834
DependsOnTargets="_SayHello"
35+
Condition="'$(_RequiresMacConnection)' == 'true'"
2936
BeforeTargets="_CleanDebugSymbols;_CleanAppBundle;_DetectAppManifest;_DetectSdkLocations;_GenerateBundleName" />
3037

3138
<PropertyGroup>

0 commit comments

Comments
 (0)