Help! This is Hell! Is the Xamarin Team listening?

JohnHindJohnHind GBMember ✭✭

I have an Android app I developed about a year ago on Xamarin Forms in VS2015. I checked it out to make some minor modifications, but I had reloaded Windows 10 since then. I fired up a completely fresh Windows 10 installation, installed VS2015 and ran Windows Update. I loaded the App code base and updated the NuGet packages (these are all Xamarin. ... packages, nothing unusual or third-party). I loaded the Oreo API in API Manager and took all the updates offered. When I rebuilt the code base, it completed without errors, but there were a couple of worrying messages:

Multiple instances of CS0618: Forms.Context is obsolete ...

"No way to resolve conflict between "mscorlib, Version=, ... and "mscorlib, Version= ... Choosing mscorlib, Version= ... arbitrarily."

The last is in output only, neither an error or warning, but it sounds really bad, and choosing code arbitrarily is rarely the right thing to do in software!

Since there were no actual errors I went ahead to debug on a real ADB target (A Lenovo Tablet, Android 6.0 - API 23). The app loads up and presents an empty screen and then terminates on an exception before executing any of my code:

Java.Lang.RuntimeException: Unable to instantiate activity ComponentInfo ... Didn't find class "md59dfe07309ceba9bfe71a67493c5725be.MainActivity" on path: DexPathList[[zip file ...

I have no idea how to proceed and have tried everything I can think of including deleting everything Xamarin, Mono and App related from the tablet, deleting the bin and obj directories and re-building, reverting the code base and trying both before and after updating NuGet packages. None of this made any difference, though in the course of all this faffing about the app did successfully run on one occasion which I could not repeat.

Please, I am getting desperate, does anyone have any kind of handle on this or any suggestion as to how I can proceed?


  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    So this is a second thread for the same problem?

    Multiple instances of CS0618: Forms.Context is obsolete ...

    There seem to be solutions around the 'net.

    Wow... Your year-old code is in need of updating because of all the progress in Xamarin.Forms, changes in Windows and so on. Huh? Who would have figured?

    I have no idea how to proceed

    Xamarin University?

  • JohnHindJohnHind GBMember ✭✭

    Clint, if you have not got anything constructive to contribute please just shut up and keep your sarcasm to yourself. You know very well that Forms.Context is not the main issue here. It is not even an error, just a warning, so it should not be preventing the code from starting up. I only mentioned it in case it gave any clue as to what might be going on. I am perfectly ready to fix that myself if I can just get past first base here, but I cannot debug anything if I cannot even get the code to start!

    The main issue is the exception that gets fired in bootstrap before the first line of my code even gets run. If I can get past that I am sure I can work out the rest.

  • So whilst it doesn't help you now, for the future it might be worth setting up dev virtual machines which you can revert to. It's not ideal, but at times like this it is nice to know you can go back to the dev environment last used and not have to deal with breaking issues/complications that happen in the meantime.

  • LarsNymandLarsNymand DKMember ✭✭

    you are not alone regarding your runtime exception. look at this thread:

    in there you will also find a bugzilla reference:

  • JohnHindJohnHind GBMember ✭✭
    edited December 2017

    Thanks, Lars and Chris. I'm not sure I'd have pegged that Bugzilla as the same issue, but I'll take your intuition on the matter and I have added what I know as a comment and offered my code base as a test case. I did notice the other postings about similar problems, but no acknowledgement from Xamarin/Microsoft of the seriousness of the situation.

    As for the virtual machine suggestion I'd love to be able to do this but Microsoft licencing and Activation gets in the way. I did take advantage of a left-over Vista licence (I think legally, but I'm not a lawyer) to create a canned build environment for another old project which has been a lifesaver. If anyone from Microsoft is listening, you should allow us to run as many virtual machines as we want under the Licence and Activation of the underlying "bare metal" installation.

  • XamITXamIT USMember ✭✭

    I am having the same issue while trying to set up the newly released reference App - SmartHotel360 demoed in Connect 2017.
    My emulators are going blank after switching between turning Hyper-V on and off to run Docker for compiling backend APIs.
    I am not sure how the roadmapping is going to work when basic UI creation and emulators are in such a broken state.
    I am new to Xamarin - and spending most of the time to get the base environment under control before even learning the details of Xamarin Forms.

  • OmarCOmarC USMember ✭✭

    @JohnHind said:

    Java.Lang.RuntimeException: Unable to instantiate activity ComponentInfo ... Didn't find class "md59dfe07309ceba9bfe71a67493c5725be.MainActivity" on path: DexPathList[[zip file ...

    on AssemblyInfo.cs

    [assembly: AssemblyVersion("1.0.*")]  

    replace with an specific version

    [assembly: AssemblyVersion("")]  // workaround!
  • PaulFitzpatrickPaulFitzpatrick GBMember ✭✭
    JohnHind. It seems like you might need a spot of binding redirect in the config file. That at least may sort one of the issues.
Sign In or Register to comment.