Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to resolve "System.Void ObjCRuntime.UserDelegateTypeAttribute::.ctor(System.Type)" reference from Xamarin.iOS

I'm getting the following error:

Failed to resolve "System.Void ObjCRuntime.UserDelegateTypeAttribute::.ctor(System.Type)" reference from "Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065"

When adding and referencing code from the Xamarin.Azure.NotificationHubs.iOS (v1.2.5.2) or HockeySDK.Xamarin (4.1.0) NuGet packages in a Xamarin.iOS application.

like image 383
Dan Rigby Avatar asked Oct 14 '16 20:10

Dan Rigby


1 Answers

This issue can occur when a Xamarin.iOS bindings package is built with the current (Cycle 8) tooling, but is being consumed by older (Cycle 7) tooling.

The best way to solve this issue is to update to the latest Xamarin stable channel and Xcode releases. At this time of this post, those are:

  • Xamarin Studio 6.1.1.15
  • Xamarin for Visual Studio 4.2.0.703
  • Xamarin.iOS 10.0.1.10
  • Xamarin.Android 7.0.1.3
  • Xamarin.Mac 2.10.0.105
  • Mono Framework 4.6.1.5
  • Xcode 8

If upgrading your Xamarin tooling is not possible at this time, using an older version of the affected NuGet package may also resolve the issue.

For example, using version 4.1.0-beta3 of the HockeySDK.Xamarin NuGet package instead of version 4.1.0.

More information can be found here: https://github.com/bitstadium/HockeySDK-Xamarin/issues/56

like image 175
Dan Rigby Avatar answered Nov 02 '22 20:11

Dan Rigby