Reputation: 168
As soon as DevExpress XPOCore (https://www.nuget.org/packages/DevExpress.Xpo) is referenced in my XamarinForms application iOS refuses to build - All other platforms build fine. (Android and UWP)
I must add this issue is apparent when building to my iPad and with the simulator.
All packages selected are latest stable.
I am using the lastest community edition of Visual Studio on windows, which connects to a Mac Mini running the latest macOS (Mojave)
The issue is also apparent when I try to build the DevExpress demos - https://github.com/DevExpress/XpoNetCoreDemos
As XPO is a free nuget package - I can not ask DevExpress directly for support. What I have found is something remotely similar, but it did not help much - https://www.devexpress.com/Support/Center/Question/Details/T643780/xpo-core-system-drawing-common-filenotfoundexception-in-xamarin-android
The error message return in visual studio is -
Failed to resolve "System.Drawing.Image" reference from
"System.Drawing.Common, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=cc7b13ffcd2ddd51" DevExpress.Xpo.XamarinFormsDemo.iOS
C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets
From output
1> C:\Program Files (x86)\Microsoft VisualStudio\2017\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(795,3):
error MT2002: Failed to resolve "System.Drawing.Image" reference from
"System.Drawing.Common, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=cc7b13ffcd2ddd51"
1>
1> 2 Warning(s)
1> 1 Error(s)
Edit - checked on Mac in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Facades - and System.Drawing.Common exists already.
Edit - will build and run on simulator on automatic provisioning, but will not build with manual provisioning to a physical iPad connected to the mac, however other applications do. (that do not use XPO) (get same error as described above on all apps using XPO on iOS)
Edit - It works (builds) in the simulator - when using Automatic provisioning, as soon as you set the provisioning to manual and set a valid provisioning profile (from the mac) and try to deploy to a device (iPad) I am unable to build, with the error listed above.
Upvotes: 0
Views: 434
Reputation: 168
It seems the Xamarin Linker does not add all required dependencies.
In the iOS Build tab, in the project settings, set the Linker Behavior property to 'Link All'
This allowed the application to be deployed to a iOS device.
Upvotes: 0