Forum Xamarin.Forms

ProjectName.iOS Could not register the assembly 'OpenTK-1.0'

PrometeuPrometeu Member ✭✭

I am pretty new in the Xamarin world and I need some help starting the iOS simulator on iPhone X (12.2) or whatever iPhone version. For example, when I try to start iPhone X (12.2) simulator and start debugging, I get the following error:

ProjectName.iOS[7769:94324] Could not register the assembly 'OpenTK-1.0': System.TypeLoadException: Could not resolve type with token 01000010 from typeref (expected class 'ObjCRuntime.DeprecatedAttribute' in assembly 'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065')

...

Unhandled Exception:

System.ArgumentOutOfRangeException: Token 0x2001513 is not valid in the scope of module Xamarin.iOS.dll Parameter name: metadataToken

I only started to get this error after I have updated my Mac Mini to 10.14.5 Mojave and updated Xcode to 10.2.1 I have updated Mono on both windows and mac. I have made this update in order to be able to debug on my iPhone which updated to 12.3 The thing is that I can debug on my iPhone 6S with no problem, but when I try to debug on the iPhone simulator, that error pops out.

Currently I am using Visual Studio Professional 15.9.12 (latest version at this time).

Any thoughts? Thanks!

Best Answer

  • PrometeuPrometeu Member ✭✭
    Accepted Answer

    @LucasZhang yes I did, I have updated my Xamarin Forms, I used version 3.6, I have updated it to version 4.0 and ran a clean and rebuild, the problem solved by itself. I am not sure what exactly caused the problem, but this update seems to have fixed the problem for me.

Answers

  • LucasZhangLucasZhang Member, Xamarin Team Xamurai

    Did you download the library OpenTK from Nuget Manager?

  • PrometeuPrometeu Member ✭✭
    Accepted Answer

    @LucasZhang yes I did, I have updated my Xamarin Forms, I used version 3.6, I have updated it to version 4.0 and ran a clean and rebuild, the problem solved by itself. I am not sure what exactly caused the problem, but this update seems to have fixed the problem for me.

Sign In or Register to comment.