Xamarin iOS Simulator works with old code

When I debug the Xamarin.iOS project from Visual Studio, it builds, installs on the simulator, and runs the application without problems. But on startup, I see a bunch of Debug traces from a method that no longer exists in my C # code. I can also set breakpoints in the class from which I removed the method, with the same line numbers where this method was used before, and I will see the remote method in the call stack when the debugger stops.

I closed and reopened Visual Studio, reset the connection to the Mac build server, cleaned and rebuilt my solution, and manually deleted the solution output. On a Mac, I closed and reopened the simulator, and tried resetting the Content and Settings that clear the application. But the situation still persists, even after all this. Is there anything else I can try on a Mac to make sure all cached copies of the old code have been deleted?

+8
ios ios-simulator xamarin
source share
6 answers

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

+7
source share

In iOS Simulator (on Mac), click โ€œReset Content and Settingsโ€ in the main menu.

+2
source share

Good thing this worked with my Android project suffering the same issue:

  • Right-click on the Android project and select "Properties."
  • Select "Android Settings," then "Packaging."
  • Uncheck the Use shared deadline option.

then it worked fine

+1
source share

Check your configuration manager (drop down with Debug, Release, etc.) and make sure all projects are built. Usually it disables all projects that you work with for some unknown reason.

This means that it does not restore all projects and, therefore, shows the old version.

According to your comment about the rebuilding of each project, this is a classic sign of projects that are not checked for creation at launch, and why you should do it manually.

+1
source share

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

What doesn't work for me :

  • computer reboot
  • rebooting visual studio
  • delete bin / obj folders
  • enters Configuration Manager (Debug / Release / Configuration Manager) and everything is ticking there - everything has been noted.
  • change application version in manifest

What worked for me ?

Removing the application from the emulator and then debugging again . It was an Android emulator, so I deleted it by clicking on the application icon and holidng for a long time, and then dragging it to "Uninstall application". On an iOS simulator, it should be similar.

+1
source share

In my case, I had to include all architectures:

  • Android project properties
  • Andrid prions
  • Split Advanced Tab
  • Select all architectures and rebuild
0
source share

All Articles