Change to VS 2019 (Mac) resulted in unusable System references in Android

lombardalombarda Member ✭✭

I have two published apps (shared) written in Xamarin using VS 2017 and decided to upgrade to 2019 as it is supposedly stable. Android no longer compiles and all the System modules under references are crossed out. This includes System, System.Core, System.Xml, System.Xml.Linq with error message "Assembly not found for Xamarin.Android v9.0 support". Tried changing to V8.1, V8.0 nada.
I reverted back to 2017 with time machine backups but problem persists. Any ideas of where to look next will be much appreciated.
To be sure I also reverted to my latest working git copy of the project. Still no luck.

Best Answers

  • lombardalombarda ✭✭
    Accepted Answer

    Seems like a known issue addressed in developercommunity.visualstudio.com/content/problem/514955/lost-net-assemblies-after-vs-update.html. Solved my issue by restoring /Library/Frameworks/Xamarin.... from a backup

  • lombardalombarda ✭✭
    edited April 8 Accepted Answer

    As extension to the answer, I also fixed the FrameworkList.xml file as suggested in the link provided which works swell. So no need to find a backup of your previous version

Answers

  • lombardalombarda Member ✭✭
    Accepted Answer

    Seems like a known issue addressed in developercommunity.visualstudio.com/content/problem/514955/lost-net-assemblies-after-vs-update.html. Solved my issue by restoring /Library/Frameworks/Xamarin.... from a backup

  • lombardalombarda Member ✭✭
    edited April 8 Accepted Answer

    As extension to the answer, I also fixed the FrameworkList.xml file as suggested in the link provided which works swell. So no need to find a backup of your previous version

  • msraomsrao Member
    edited April 8

    Updating FrameworkList.xml solved system package errors.But when building my project,I am getting new errors like "/myproject/Droid/obj/Debug/android/src/mono/android/app/XamarinAndroidEnvironmentVariables.java(21,21): Error: error: illegal start of type
    (myproject.Droid) javac".

  • lombardalombarda Member ✭✭

    @msrao said:
    Updating FrameworkList.xml solved system package errors.But when building my project,I am getting new errors like "/myproject/Droid/obj/Debug/android/src/mono/android/app/XamarinAndroidEnvironmentVariables.java(21,21): Error: error: illegal start of type
    (myproject.Droid) javac".

    Other than the generic fault solved by the xml, this seems to start getting more project specific. What I tend to do in these cases is clean the project files (bin/obj) restart and if that does not work, create a brand new blank project and import my code from the problematic one bits at a time to find where the issue occurs if not disappearing altogether. The only other option is posting long log files to the VS team who has the know-how to trace things. PS just create a new Hello world app, run it, and see if that still happens and if so it must have more to do with some SDK/NDK reference stuff where I get out of depth

  • msraomsrao Member

    Hello world app works fine.. XamarinAndroidEnvironmentVariables issue may be my project specific .But this was working until last VS builds without any issue ..New VS build introduced this . XamarinAndroidEnvironmentVariables seems like auto generated file by mono. in my case file is generated with lot of special characters ..Anyone with facing similar issue, please help if you know any solution

Sign In or Register to comment.