gpt4 book ai didi

c# - 带有 netstandard : can't build UWP 的 Xamarin Forms 项目

转载 作者:行者123 更新时间:2023-11-30 17:29:57 25 4
gpt4 key购买 nike

目前我正在开发 Xamarin 应用程序,它使用 .Net-Standard 代码共享策略。虽然我无法在 android 上成功构建和运行,但我在 UWP 项目中遇到了一些问题。

当我尝试构建项目时收到此错误消息:

Could not copy the file "obj\x86\Debug\myapp.UWP.xr.xml" because itwas not found.

Could not copy the file "obj\x86\Debug\MainPage.xbf" because it wasnot found.

Could not copy the file "obj\x86\Debug\App.xbf" becauseit was not found.

Cannot resolve Assembly or Windows Metadata file 'Type universe cannotresolve assembly: myapp.Basic, Version=1.0.0.0, Culture=neutral,PublicKeyToken=null.'

当我在寻找这些错误消息时,我在 stackoverflow 上找到了这个线程:

Missing xaml.xr of a class library file in UWP

线程建议在包含 XAML 代码的项目中启用“生成库布局”,这看起来很有希望,因为 myapp.Basic 项目包含一些 XAML 代码。不幸的是,.Net 标准项目中完全缺少此选项。

谁能帮我解决这个问题?

最佳答案

在您的 UWP 项目中手动添加对任何其他 .Net 标准类库项目的引用

在你的例子中是 myapp.Basic

关于c# - 带有 netstandard : can't build UWP 的 Xamarin Forms 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50564295/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com