c# - "The path .. would result in a file outside the App Bundle and cannot be used"错误,单触摸/Xamarin

标签 c# ios mono xamarin.ios xamarin

在将我的 Xamarin.IOS - 项目迁移到 64 位统一 - API 后,我目前正面临一个非常奇怪和烦人的错误消息。确切的错误信息是:

   /Users/falcowinkler/Dev/AHK_App -Kopie/AHK_App_iOS/../ahk_app_ios/resources/.DS_Store: 
Error: The path   '../ahk_app_ios/resources/.DS_Store' would result 
in a file outside of the app bundle and cannot be used. (AHK_App_iOS).

我不仅在 .DS_Store 上遇到了这个错误,在另外两个文件上也遇到了这个错误。 以下是我尝试过的方法。

  • 清理/重建
  • 删除bin/obj文件夹并重建
  • 我删除了引发错误的文件,只是为了得到另一条消息,指出项目缺少这些文件。之后我又添加了,又出现了和上面一样的错误
  • 我尝试将我的项目移动到其他位置,但错误丝毫没有改变。
  • 我尝试在迁移之前删除所有有问题的文件,但效果不佳。

有谁知道 Xamarin 中所有文件引用的存储位置,以便我可以查看/编辑它们以找出错误是什么?

我的意思是 DS_Store 文件只是来自 mac - finder 架构的一个小文件,对我的项目来说甚至不是必需的,但它仍然在引用它,我想我只需要删除这些引用。

如果有人也遇到了这些问题,并且有解决方案,请在这里快速发帖,谢谢:)

更新 我现在很确定我的项目中有一些文件的错误引用,我在 git hub 上看到了类似的问题。但是我怎样才能消灭它们呢?我尝试删除我的整个资源文件夹并再次添加它,但它也没有帮助。错误消息现在如下所示:

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: 
Error:   Bundle Resource '../ahk_app_ios/resources/.DS_Store' 
not found on disk (should be at '/Users/falcowinkler/Documents/AHKKopie/ahk_app_ios/resources/.DS_Store') (AHK_App_iOS)

最佳答案

如果其他人遇到此问题,只需在您的项目文件中搜索文件名即可。将出现 .csproj 文件,您可以在其中清除对导致问题的文件的引用。

关于c# - "The path .. would result in a file outside the App Bundle and cannot be used"错误,单触摸/Xamarin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28743105/

相关文章:

c# - ServiceClient (Microsoft.Azure.Devices) OpenAsync 问题

c# - 如何计算路径上的点?

ios - CompoundPredicate NSPredicate

linux - Mono:如何以阻塞方式执行 shell 脚本?

c# - 在 .net 结构构造函数中使用 try-catch

c# - MonoGame 和 Microsoft.XNA.Framework 命名空间之间的引用不明确

ios - UISplitViewController 推送动画故障与 hidesBottomBarWhenPushed

ios - 在触摸 tableView 时检测单元格索引(但不是页眉/页脚)

c# - TCP Socket SendAsync 操作是否可以在不传输 BufferList 中的所有字节的情况下完成?

visual-studio - 如何从 Visual Studio 定位 .Net Core?