zwilkin
zwilkin

Reputation: 43

Xamarin.Forms iOS Project Failed to Resolve "System.Runtime.InteropServices.StandardOleMarshalObject"

After updating to Xcode 10.0 (on Mac) and Xamarin.Forms v3.2.0.871581 (on Mac/PC), I am no longer able to successfully build my Forms.iOS project.

Not only does it not successfully build, but often will attempt to deploy to the iPhoneSimulator just to fail when attempting to install the application on the sim.

This is the error I am encountering:
Failed to resolve "System.Runtime.InteropServices.StandardOleMarshalObject" reference from "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

Here is the full crash log output:

1>------ Rebuild All started: Project: EISPocketJMS4.iOS, Configuration: Debug iPhoneSimulator ------
1>  Connecting to Mac server 192.168.1.165...
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Xamarin.Sdk.targets(66,3): warning MSB3491: Could not write lines to file "obj\iPhoneSimulator\Debug\\_TelemetryProps". Could not find a part of the path 'C:\Users\zach\Desktop\EISPocketJMS4_Solution\EISPocketJMS4\EISPocketJMS4.iOS\obj\iPhoneSimulator\Debug\_TelemetryProps'.
1>  Connecting to Mac server 192.168.1.165...
1>  No way to resolve conflict between "System.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Numerics, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.
1>  No way to resolve conflict between "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.
1>  Consider app.config remapping of assembly "System.Numerics, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "2.0.5.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.iOS\v1.0\System.Numerics.dll] to Version "4.0.0.0" [C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll] to solve conflict and get rid of warning.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190.
1>C:\Users\zach\Desktop\EISPocketJMS4_Solution\EISPocketJMS4\EISPocketJMS4\Globals.cs(124,40,124,59): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
1>  EISPocketJMS4.iOS -> C:\Users\zach\Desktop\EISPocketJMS4_Solution\EISPocketJMS4\EISPocketJMS4.iOS\bin\iPhoneSimulator\Debug\EISPocketJMS4.iOS.exe
1>  Detected signing identity:
1>    Provisioning Profile: "iOS Team Provisioning Profile: *" ([removed for privacy])
1>    Bundle Id: com.eis.EISPocketJMS4
1>    App Id: DH32F99JXP.com.eis.EISPocketJMS4
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(794,3): error MT2002: Failed to resolve "System.Runtime.InteropServices.StandardOleMarshalObject" reference from "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Xamarin Simulator - Failed to install

Failed to install //Users/ZachAibrary/Caches/Xamarin/mtbs/builds/EISPocketIMS4.iOS/1afdfObe9e0c1d15a5f8dfb4597 4398e/bin/iPhoneSimulator/Debug/EISPocketIMS4.i0S.app to 15C32787-E053AFCA-8598-D07E93B37640. Failed to launch the simulator. Could not find file "/Users/ZachAibrary/Caches/Xamarin/mtbs/builds/EISPocketiMS4.OS/1afdfObe9e0c1d15a5f8dfb45974398e/bin/iPhoneSimulator/Debug/EISPock etIMS4.i0S.app/EISPocketIMS4.i0S"


NOTE: I have tried both "Link Framework SDKs Only" and "Link All" Linking Behaviors.

I have been on this for nearing 2 days now, please help!

Thanks

Upvotes: 1

Views: 1370

Answers (1)

zwilkin
zwilkin

Reputation: 43

ANSWER

I don't have a definitive answer on what fixed the problem, but here are the steps I took that seemed to resolve it...

  1. Unloaded all projects
  2. Cleaned the entire solution
  3. Restarted computer
  4. Re-loaded all projects -> Then rebuilt the entire solution
  5. Re-set Linking Behavior to "Link All" (was set back to "Link Framework SDKs Only")

Issue resolved.

Upvotes: 2

Related Questions