Forum Xamarin Xamarin.Forms

Error while updating Xamarin forms from 4.2.0.709249 to 4.8.0.1534

Hi,
I am new to xamarin projects. I need to import a new font to my project for that I added [assembly: ExportFont("SuisseIntl-BoldItalic.otf", Alias = "MyAwesomeCustomFont")]. But I came to know that the exportfont feature will work only for versions greater than 4.5. So I tried to update the xamarin form from 4.2.0.709249 to 4.8.0.1534. After that I am getting an error in Intializecomponent().. "system.typeloadexception message=could not resolve type with token 01000012 from typeref (expected class 'xamarin.forms.xaml.diagnostics.visualdiagnostics' in assembly 'xamarin.forms.core, version=2.0.0.0, culture=neutral, publickeytoken=null')" . When I degrading it then the project runs smoothly. Please help us to solve the issue

Thanks
divya

Tagged:

Answers

  • JarvanJarvan Member, Xamarin Team Xamurai
    edited October 14

    I am getting an error in Intializecomponent()....

    After updating the xamarin.forms package, try to empty the bin and obj folders of the shared project and platform project. Then rebuild the solution and deploy the project again.

    If it doesn't work, try updating the VS to the lastest statable version. Then create a new project and copy the code to the sample for test. Xamarin Forms requires a specific version of the Android/iOS Support libraries, the new created project using new version VS will not have the problem.

  • divyaeficazdivyaeficaz Member

    @Jarvan Thanks for the reply. I tried by removing the bin and obj folders and rebuild the solution, still the same issue is there. My Visual studio is Enterprise edition version 16.3.0 with .NET framework 4.8.03761. Do I need to update the version?

    Thanks
    Divya

  • JarvanJarvan Member, Xamarin Team Xamurai

    Try updating the VS to the lastest statable version. Then create a new project and copy the code to the sample for test.

Sign In or Register to comment.