Mismatch between code that's built/debugged and code that's actually running

Suddenly, when deploying my Android app to a real device, the code that's running on the device doesn't match the code that was compiled or is being stepped through. So my code file no longer has 'this.Foo = 42', but the device still executes it and I can see in the Locals window that this.Foo has been set to 42.
However, changing colors in Resources/values does change the colors in the view??? So something is deploying, just not the dlls?
Things I have tried:

  • I have deleted the apk file from the device
  • Rebooted the device
  • Deleted all .apk files from my PC
  • Deleted all obj and bin folders from the solution folder
  • Tried typing in gibberish to the .cs file - the compiler does correctly error so it is compiling the files I'm looking at.
  • Rebooted my PC
  • Clean solution. Rebuild solution etc.
  • Tried with both "Use shared runtime" turned on and off.
  • Checked "Use Fast Deployment" is off

I am using VS 2017 Preview 15.3 because when building in VS 2015 the build gets stuck forever at zipalign.exe and moving to Preview was the only fix I could find (I forget why I couldn't use VS2017 either but is was almost certainly because of yet another bug).

I just tried to check if things are fine debugging on the x86 emulator but now I getting the zipalign.exe hang in VS 2017 Preview too :-( What have MS done to the once-great MonoTouch/MonoDroid platform that I happily paid for?

I updated to the Xamarin preview bits in an attempt to fix this and other bugs this morning but nothing has been fixed...

Xamarin -
Windows 10 1607 14393.1198


  • pauldpauld USMember ✭✭

    Just tried in VS2015 and got it to build, same issue on the device. x86 simulator works ok. My VS 2015 is using Xamarin.Android - newer than in VS2017 Preview?
    Will go 'back to the Mac' and try there.

Sign In or Register to comment.