Xamarin.iOS 生成错误 System.IO.FileNotFoundException

标签 xamarin xamarin.ios xamarin.forms

当我尝试使用分发配置文件进行构建时出现此错误

Error       System.IO.FileNotFoundException: /Users/xxx/Library/Caches/Xamarin/mtbs/builds/iOSClient/f4287e1ce437e3e2197bfddb3a942d82/obj/iPhone/Ad-Hoc/optimized/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0d49686b6c786179203a3e3b654d3e75237d636a" rel="noreferrer noopener nofollow">[email protected]</a> does not exist
File name: '/Users/xxx/Library/Caches/Xamarin/mtbs/builds/iOSClient/f4287e1ce437e3e2197bfddb3a942d82/obj/iPhone/Ad-Hoc/optimized/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7e3a1b181f0b120a53494d48163e4d06500e1019" rel="noreferrer noopener nofollow">[email protected]</a>'
  at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) [0x001bd] in /private/tmp/source-mono-4.6.0/bockbuild-mono-4.6.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.IO/File.cs:112 
  at Xamarin.MacDev.Tasks.SmartCopyTaskBase.CopyFile (System.String source, System.String target, System.String targetItemSpec) [0x0002d] in <4ed71c0d8bd847c3bc4130be1482dce1>:0 
  at Xamarin.MacDev.Tasks.SmartCopyTaskBase.Execute () [0x00116] in <4ed71c0d8bd847c3bc4130be1482dce1>:0    iOSClient           

知道原因可能是什么吗?

最佳答案

这种情况下的解决方案是删除 C:\Users[当前用户]\AppData\Local\Xamarin 下的所有内容。

关于Xamarin.iOS 生成错误 System.IO.FileNotFoundException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41226809/

相关文章:

ios - Xamarin NetworkReachability 错误地报告可达性

ios - 如何利用约束 - FluentConstraints 和 FluentLayouts for Xamarin.iOS

ios - UICollectionView 重复和乱序显示项目

visual-studio - 我可以使用 Visual Studio 2017 Pro 安装 Xamarin Android 10.0 吗?

xamarin - 将GestureRecognizer添加到gridview中的行

c# - MvvmCross - 如何添加自定义模式转换

c# - Xamarin - 设置跨平台 Hello World App

ios - 无法创建Xamarin Forms Picker自定义渲染器

xamarin - 如何制作圆角入口控件 Xamarin.Forms

xamarin.forms - 如何在 Xamarin.Forms UWP 共享代码项目中使用 Acr.Userdialogs?或任何 XF UWP 项目