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

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

问题描述

当我从Visual Studio调试我的Xamarin.iOS项目时,它会在模拟器上构建,安装,并毫无问题地启动应用程序。但是在启动时,我看到一堆Debug跟踪来自一种方法,这种方法甚至不再存在于我的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?

推荐答案

In你的项目文件夹删除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天全站免登陆