Xamarin iOS Simulator running old code

泪湿孤枕 提交于 2019-11-30 13:45:33

In your project folder delete the bin and obj folders. This works for me but is still annoying.

In the iOS Simulator (on the Mac) click the "Reset Contents and Settings" entry the main menu.

Well this worked with my Android project suffering from the same issue:

  1. Right click on Android project then select "Properties".
  2. Select "Android Options" then "Packaging".
  3. Un-check the "Use Shared Runtime" options.

then it worked normally

Check your Configuration Manager (the drop down with Debug, Release etc) and check that all the projects are being built. It usually unchecks all the projects you are working with for some unknown reason.

This means that it isn't rebuilding all the projects and it hence shows an old version.

As per your comment of rebuilding each project, this is a classic sign of the projects not being checked to be built on run and why you have to do it manually.

I had a similar problem (though on an Android emulator).

What didn't work for me:

  • restarting the computer
  • restarting Visual Studio
  • deleting bin / obj folders
  • going into Configuration Manager (Debug / Release / Configuration Manager) and ticking everything there - everything was ticked
  • changing the version of the app in the manifest

What worked for me?

Uninstalling the app from the emulator and then running Debug again. It was an Android emulator, so I uninstalled by clicking on the app icon and holidng for long, and then dragging it to "Uninstall App". On an iOS simulator it should be similar.

In my case I had to enable all architectures:

  • Android project properties
  • Andrid Oprions
  • Section Anvanced Tab
  • Select all architectures and rebuild

I still have this problem with iOS simulators. My solution:

  1. Unload the iOS project
  2. Reload the iOS project
  3. Build as usual

I do the above when I change simulator device.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!