繁体   English   中英

UWP应用程序无法解析.NET Standard 2.0程序集

[英]UWP app not able to resolve .NET Standard 2.0 assembly

我有一个UWP应用程序,在其中一个引用的项目中,串口正在被使用。 所以我将该项目作为.NET Standard 2.0项目。 UWP应用程序已更改为Target Windows 10 Fall Creators Update(10.0; Build 16299)

根据兼容性图表,它应该有效。 但我收到编译错误

Cannot resolve Assembly or Windows Metadata file 'Type universe cannot resolve assembly: netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51.'

我不确定出了什么问题。

在我的情况下,它是导致此问题的Microsoft.NETCore.UniversalWindowsPlatform nuget的过时版本。

尝试不仅要设置Target ,还要设置最小版本到Fall Creators Update

在Microsoft Visual Studio中创建UWP应用程序时,您可以选择要定位的版本。 使用.NET Standard 2.0的项目必须具有最低版本的Build 16299或更高版本。 [文档]

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM