I have a Xamarin.iOS solution with Xamarin.iOS custom binding and I can build it locally on my Mac OS in Visual Studio for Mac without any issues. But when I'm trying to build the same solution using F# Fake and build scripts with the same version of tooling on my Mac OS build server I'm getting the following error:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.ObjCBinding.CSharp.targets(58,3): The specified task executable location "/Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/xbuild/Xamarin/iOS/btouch-native.exe" is invalid.
I've checked the ObjCBinding.CSharp.targets
and Xamarin.iOS.ObjCBinding.CSharp.props
and can see that for some reason my Mac OS build host is treated as a non-Unix system:
<BTouchToolPath Condition="'$(OS)' == 'Unix' And '$(TargetFrameworkIdentifier)' == 'Xamarin.iOS' And '$(BTouchToolPath)' == ''">$(MonoTouchSdkRoot)/bin/</BTouchToolPath>
<BTouchToolPath Condition="'$(OS)' != 'Unix' And '$(TargetFrameworkIdentifier)' == 'Xamarin.iOS' And '$(BTouchToolPath)' == ''">$(MSBuildExtensionsPath)\Xamarin\iOS\</BTouchToolPath>
<BTouchToolExe Condition="'$(OS)' == 'Unix' And '$(TargetFrameworkIdentifier)' == 'Xamarin.iOS' And '$(BTouchToolExe)' == ''">btouch-native</BTouchToolExe>
<BTouchToolExe Condition="'$(OS)' != 'Unix' And '$(TargetFrameworkIdentifier)' == 'Xamarin.iOS' And '$(BTouchToolExe)' == ''">btouch-native.exe</BTouchToolExe>
I've also searched for BTouchToolExe
tool and found it here, updated my .prop file with this path (for all platforms) and got lots of issues which makes me think that I should find the root cause than trying to fix just a symptom:
/Library/Frameworks/Xamarin.iOS.framework/Versions/11.6.1.3/bin/btouch-native
I've tried to build the same source code using Visual Studio for Mac on my build host - it works perfectly fine so it seems to be some kind of issue of my F# Fake and build scripts (mostly default). My setup is (latest and greatest):
- Mac OS build host
- Mono
5.4.1
- Visual Studio for Mac
7.3.3
- Xamarin.iOS
11.6.1.3
Which configuration could be wrong on my build host?