[英]UWP app not able to resolve .NET Standard 2.0 assembly
I have a UWP app and in one of the referenced projects the serial port is getting used. 我有一个UWP应用程序,在其中一个引用的项目中,串口正在被使用。 So I made that project a .NET Standard 2.0 project.
所以我将该项目作为.NET Standard 2.0项目。 The UWP app was changed to Target Windows 10 Fall Creators Update (10.0;Build 16299)
UWP应用程序已更改为Target Windows 10 Fall Creators Update(10.0; Build 16299)
As per the compatibility chart it should have worked. 根据兼容性图表,它应该有效。 But I am getting compilation error
但我收到编译错误
Cannot resolve Assembly or Windows Metadata file 'Type universe cannot resolve assembly: netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51.'
I am not sure what is going wrong. 我不确定出了什么问题。
在我的情况下,它是导致此问题的Microsoft.NETCore.UniversalWindowsPlatform nuget的过时版本。
Try setting not only the Target but also the Minimum version to Fall Creators Update . 尝试不仅要设置Target ,还要设置最小版本到Fall Creators Update 。
When creating a UWP app in Microsoft Visual Studio, you can choose which version to target.
在Microsoft Visual Studio中创建UWP应用程序时,您可以选择要定位的版本。 Projects using .NET Standard 2.0 must have a Minimum Version of Build 16299 or later.
使用.NET Standard 2.0的项目必须具有最低版本的Build 16299或更高版本。 [docs]
[文档]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.