如何解决“Foundation”的问题和“UIKit”在appcenter构建中找不到?

发布于 2025-01-13 07:55:02 字数 792 浏览 0 评论 0原文

我已将“Xamarin.ios”的引用添加到我的项目中,并且它在本地运行良好。我已提交代码并在应用程序中心对其进行了构建,但它失败并显示错误,如下所述。

/Users/runner/work/1/s/Project/ViewModels/OrderViewModel.cs(19,7): error CS0246: The type or namespace name 'Foundation' could not be found (are you missing a using directive or an assembly reference?) [/Users/runner/work/1/s/Project/Project.csproj]
/Users/runner/work/1/s/Project/ViewModels/OrderViewModel.cs(20,7): error CS0246: The type or namespace name 'UIKit' could not be found (are you missing a using directive or an assembly reference?) [/Users/runner/work/1/s/Project/Project.csproj]

Time Elapsed 00:00:08.79
##[error]Error: The process '/Library/Frameworks/Mono.framework/Versions/6_12_11/bin/msbuild' failed with exit code 1

我也尝试过各种单声道版本,但它对我不起作用。您能给我建议同样的解决方案吗?

I have added a reference for "Xamarin.ios" to my project and it is working fine locally. I have committed the code and made a build for it in appcenter but it is failing and showing me error as mentioned below.

/Users/runner/work/1/s/Project/ViewModels/OrderViewModel.cs(19,7): error CS0246: The type or namespace name 'Foundation' could not be found (are you missing a using directive or an assembly reference?) [/Users/runner/work/1/s/Project/Project.csproj]
/Users/runner/work/1/s/Project/ViewModels/OrderViewModel.cs(20,7): error CS0246: The type or namespace name 'UIKit' could not be found (are you missing a using directive or an assembly reference?) [/Users/runner/work/1/s/Project/Project.csproj]

Time Elapsed 00:00:08.79
##[error]Error: The process '/Library/Frameworks/Mono.framework/Versions/6_12_11/bin/msbuild' failed with exit code 1

I have also tried with various mono versions but it did not work for me. Can you please suggest me the solution for the same?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

万劫不复 2025-01-20 07:55:02

确保 Xamarin.iOSiOS 项目 而非 共享项目 中引用,因为 netstandard 项目无法使用任何特定于 Xamarin.iOS 的 API。

打开您的 iOS csproj 文件,检查其中是否存在

请参阅 https://github.com/xamarin/xamarin-macios/issues/10191< /a> .

Ensure that Xamarin.iOS has referenced in iOS project not shared prject, because netstandard project can't use any API specific to Xamarin.iOS .

Open your iOS csproj file to check if <Reference Include="Xamarin.iOS" /> exists there .

Refer to https://github.com/xamarin/xamarin-macios/issues/10191 .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文