如何解决“Foundation”的问题和“UIKit”在appcenter构建中找不到?
我已将“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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保
Xamarin.iOS
在iOS 项目
而非共享项目
中引用,因为 netstandard 项目无法使用任何特定于 Xamarin.iOS 的 API。打开您的 iOS
csproj
文件,检查其中是否存在
。请参阅 https://github.com/xamarin/xamarin-macios/issues/10191< /a> .
Ensure that
Xamarin.iOS
has referenced iniOS project
notshared 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 .