我已将系统更新为IOS11。适用于Windows的Visualstidio具有所有最新的xamarin更新,Mac os Sierra是最新的,而Xcode是最新版本。
我的问题:如果要在模拟器上调试,则会发生以下错误:
Error error HE0046: Failed to install the app 'ch.ABC' on the device 'iOS 11.0 (15A372) - iPhone 6 Plus': lstat of /Users/administrator/Library/Caches/Xamarin/mtbs/builds/ABC/a3481f272dab3f68e6e828203695f442/bin/iPhoneSimulator/Debug/ABC.app failed: No such file or directory
Run Code Online (Sandbox Code Playgroud)
在Mac上,该路径中存在ABC.app。
Buildlog:
System.IO.FileNotFoundException: The file '/Users/administrator/Library/Caches/Xamarin/mtbs/builds/ABC/a3481f272dab3f68e6e828203695f442/obj/iPhoneSimulator/Debug/build-signature/signature' was not found on the Mac
File name: '/Users/administrator/Library/Caches/Xamarin/mtbs/builds/ABC/a3481f272dab3f68e6e828203695f442/obj/iPhoneSimulator/Debug/build-signature/signature'
at Xamarin.Messaging.Ssh.MessagingFileManager.d__11.MoveNext() in C:\d\lanes\5126\bd7e3753\source\xamarinvs\src\Messaging\Xamarin.Messaging.Ssh\MessagingFileManager.cs:line 171
Run Code Online (Sandbox Code Playgroud)
此签名文件也位于正确的路径上。
我试图修复该错误:
-清理和重建无效。
-删除bin和obj文件夹无效。
-我使配置完全没有效果。
-新项目工作。
-此项目工作是在Visual Studio for Mac中构建的
有谁知道这里可能是什么问题?
谢谢安德烈亚斯
编辑:我认为这是一个普遍的Xamarin问题。在模拟器中更新到IOS 11后,旧项目(IOS11之前)无法运行。
我对这个if语句有一个小问题:
if (selectedlabel.Text!=null|| selectedlabel.Text!=""|| selectedlabel!=null)
{
basketID = int.Parse(selectedlabel.Text); //nullpointer Value Can not be null
}
Run Code Online (Sandbox Code Playgroud)
为什么这不起作用?
我设置了一个断点,我看到它selectedlabel.Text是null: