Search code examples
xamarinxamarin.iosxamarin.formsesri-arc-engine

Native Linking Error: Framework not found ArcGIS-sim64 when compiling IOS Xamarin.Forms on Windows


As stated in the title, I am getting the following linking error when attempting to compile a Xamarin.Forms app for IOS. I am developing on Visual Studio for Windows and using a MacBook for compilation.

1>C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(747,3): error : Native linking error: warning: directory not found for option '-F/Users/vvp/Library/Caches/Xamarin/mtbs/builds/RT.iOS/9bd34334c2bb0c14c8bdf794f67e9fc/framework'1>

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(747,3): error:  Native linking error: warning: directory not found for option '-F/Users/vvp/Library/Caches/Xamarin/mtbs/builds/RT.iOS/9bd34334c2bb0c14c8bdf794fb67e9fc/framework'

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(747,3): error : Native linking error: framework not found ArcGIS-sim64

Compiling on the Mac directly using VS 2017 works. The application deploys and runs on the IPhone Simulator. I am using the exact same configuration. However I get the following warnings which I believe are consistent with the error messages above.

     /Users/vvv/Desktop/Selectron.Field.RouteTracker/RT/RT.iOS/warning MT5203: Warning: warning: ignoring file 

    /Users/vvv/Desktop/Selectron.Field.RouteTracker/packages/Esri.ArcGISRuntime.Xamarin.iOS.100.1.0/framework/ArcGIS-sim.framework/ArcGIS-sim, file was built for i386 which is not the architecture being linked (x86_64): 

    /Users/vvv/Desktop/Selectron.Field.RouteTracker/packages/Esri.ArcGISRuntime.Xamarin.iOS.100.1.0/framework/ArcGIS-sim.framework/ArcGIS-sim (RT.iOS) Native linking

    /Users/vvv/Desktop/Selectron.Field.RouteTracker/packages/Esri.ArcGISRuntime.Xamarin.iOS.100.1.0/framework/ArcGIS-sim.framework/ArcGIS-sim, file was built for i386 which is not the architecture being linked (x86_64): 

 /Users/vvv/Desktop/Selectron.Field.RouteTracker/packages/Esri.ArcGISRuntime.Xamarin.iOS.100.1.0/framework/ArcGIS-sim.framework/ArcGIS-sim (RT.iOS) Native linking


/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(3,3): Warning MSB6002: The command-line for the "MTouch" task is too long. Command-lines longer than 32000 characters are likely to fail. Try reducing the length of the command-line by breaking down the call to "MTouch" into multiple calls with fewer parameters per call. (MSB6002) (RT.iOS)

I have tried changing the supported architecture through visual studio, no luck.

I am guessing the compilation process on the MAC is providing certain arguments allowing for the build to occur regardless. Any suggestions on documentation or ideas on the subject are appreciated.

Has not been tested on the actual device yet.

The files in question at Users/vvp/Library/Caches/Xamarin/mtbs/builds/RT.iOS/9bd34334c2bb0c14c8bdf794fb67e9fc/framework' on the MAC which do exist are: ArcGIS-sim: a dynamically linked shared library i386 ArcGIS-sim64: a 64-bit dynamically linked shared library x86-64

However ArcGis-arm appears not to be present (it is a available on my windows machine not Mac).

Additionally, I am receiving the following error in my IOS project file, although I have confirmed the file in question is there.

    <Error Condition="!Exists('..\..\packages\Esri.ArcGISRuntime.Xamarin.iOS.100.1.0\build\Xamarin.iOS10\Esri.ArcGISRuntime.Xamarin.iOS.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Esri.ArcGISRuntime.Xamarin.iOS.100.1.0\build\Xamarin.iOS10\Esri.ArcGISRuntime.Xamarin.iOS.targets'))" />

Solution

  • Visual studio 16 was lacking the latest update.

    I should have realized this but the file locations were just different.

    Updating visual studio and xamarin solved the issues.