运行旧代码的 Xamarin iOS 模拟器 [英] Xamarin iOS Simulator running old code

查看:31
本文介绍了运行旧代码的 Xamarin iOS 模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从 Visual Studio 调试我的 Xamarin.iOS 项目时,它会在模拟器上构建、安装并启动应用程序而不会出现问题.但是在启动时,我看到了一堆来自一个方法的调试跟踪,这些方法甚至不再存在于我的 C# 代码中.我还可以在删除方法的类上设置断点,该断点与该方法以前所在的行号相同,当调试器停止时,我将在调用堆栈中看到删除的方法.

When I debug my Xamarin.iOS project from Visual Studio, it builds, installs on the simulator, and launches the app without issue. But on launching, I'm seeing a bunch of Debug tracing from a method that doesn't even exist in my C# code anymore. I can also set breakpoints on the class from which I removed the method at the same line numbers where this method used to be, and I will see the removed method in the call stack when the debugger stops.

我已经关闭并重新打开了 Visual Studio,重置了与 Mac 构建服务器的连接,清理并重建了我的解决方案,并手动删除了解决方案输出.在 Mac 上,我关闭并重新打开模拟器,并尝试重置内容和设置,这确实清除了应用程序.但即使在这一切之后,情况仍然存在.我是否可以在 Mac 上尝试其他方法以确保已删除旧代码的所有缓存副本?

I've 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 the Mac, I've closed and reopened the simulator, and tried Reset Content and Settings, which does clear out the app. But the situation still persists, even after all that. Is there something else can I try on the Mac to make sure that all cached copies of old code have been deleted?

推荐答案

在你的项目文件夹中删除 bin 和 obj 文件夹.这对我有用,但仍然很烦人.

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

这篇关于运行旧代码的 Xamarin iOS 模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆