Search code examples
xamarinxamarin.iosms-solver-foundation

Cannot build Xamarin.iOS with Microsoft Solver Foundation


I've added Microsoft Solver Foundation via Nuget to a Xamarin iOS project but it fails to build with this message:

Build FAILED.

MTOUCH : warning MT5215: References to 'gdiplus' might require additional -framework=XXX or -lXXX instructions to the native linker
MTOUCH : warning MT5215: References to 'gdi32' might require additional -framework=XXX or -lXXX instructions to the native linker
MTOUCH : warning MT5215: References to 'user32' might require additional -framework=XXX or -lXXX instructions to the native linker
MTOUCH : warning MT5215: References to 'libX11' might require additional -framework=XXX or -lXXX instructions to the native linker
MTOUCH : warning MT5215: References to 'winspool' might require additional -framework=XXX or -lXXX instructions to the native linker
MTOUCH : warning MT5215: References to 'libcups' might require additional -framework=XXX or -lXXX instructions to the native linker
MTOUCH : warning MT5215: References to 'kernel32' might require additional -framework=XXX or -lXXX instructions to the native linker
clang : error : linker command failed with exit code 1 (use -v to see invocation)
error MT5209 : Native linking error : framework not found Carbon
MTOUCH : error MT5202: Native linking failed. Please review the build log.
    7 Warning(s)
    3 Error(s)

I'm just starting out with Xamarin and I haven't seen these issues before. Does anyone know how I can fix them?

Here's a screenshot enter image description here


Solution

  • I'm not sure if Mircosoft Solver has been updated recently, but my understanding is that it's internal reliance on Linq assemblies meant that it didn't work with the MonoFramework properly.

    I've not seen any reference to anyone that's successfully linked the assemblies correctly. I'm not entirely sure if Solver can actually be linked with Xamarin at the moment.

    looking at your exception logs above it's pushing the assembly build to the native linker, and it's hitting exceptions with certain dlls. In most native linker cases you would have to wait for the xamarin team to push out an update. But I don't think Solver Foundation is on their list.


    Example of native linker bugs