从 UWP 项目引用 .NETStandard 2.0 项目 [英] Reference a .NETStandard 2.0 project from UWP project

查看:27
本文介绍了从 UWP 项目引用 .NETStandard 2.0 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个 Xamarin 应用程序,并且我已经在 .NETStandard 2.0 类库中实现了核心(使用 Xamarin.Forms).它被一个实现平台特定代码的 iOs 和 Android 项目正确引用.

I am building a Xamarin application, and I have implemented the core (using Xamarin.Forms) in a .NETStandard 2.0 class library. It is correctly referenced by an iOs and Android project which implements the platform-specific code.

问题是,为了让我的应用支持UWP,我尝试添加一个UWP项目,当我尝试引用核心项目时,出现以下错误:

The problem is, I tried to add an UWP project in order that my app supports UWP, and when I try to reference the core project, I have the following error:

项目【核心项目】与uap10.0.10586 (UAP,Version=v10.0.10586)/win10-x86-aot不兼容.项目【核心项目】支持:netstandard2.0 (.NETStandard,Version=v2.0)

Project [Core project] is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586) / win10-x86-aot. Project [Core project] supports: netstandard2.0 (.NETStandard,Version=v2.0)

任何见解将不胜感激.

推荐答案

您需要将 TargetMinimum 版本都设置为 Windows 10 Fall Creator为您的项目更新 Build 16299.

You need to set both the Target and the Minimum version to Windows 10 Fall Creator Update Build 16299 for your project.

这篇关于从 UWP 项目引用 .NETStandard 2.0 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆