简体   繁体   English

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

[英]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.

相关问题 使用 blazor 加载外部 .NET Standard 2.0 程序集 - Loading an external .NET Standard 2.0 assembly with blazor 添加.NET Standard 2.0类库项目后,UWP应用程序项目出错 - UWP app project gets error after addition of .NET Standard 2.0 class library project 无法在UWP中调试.NET Standard 2.0 DLL - Can't Debug .NET Standard 2.0 DLL in UWP 如何从 .NET Standard 2.0 和 UWP 获取进程内存? - How to get process memory from both .NET Standard 2.0 and UWP? 在 UWP 应用程序的“添加引用”对话框中显示我的 .NET Standard 程序集 - Display my .NET Standard assembly in the Add Reference dialog for a UWP application 汇编版本不匹配? (.Net Core 2.0与.NET Standard 2类库) - Mismatch in assembly versioning? (.Net Core 2.0 with .NET Standard 2 class library) 在 UWP 应用程序的完全信任 win32 组件中使用 .NET 标准库时引发 FileNotFoundException(无法加载文件或程序集) - FileNotFoundException (Could not load file or assembly) thrown when using a .NET standard library in a full trust win32 component of UWP app 更改 .NET App 的程序集解析位置 - Change .NET App's Assembly Resolve Location .NET Standard 2.0中的WriteableBitmap - WriteableBitmap in .NET Standard 2.0 如何使用Windows 10 IoT(UWP)为Raspberry Pi 3创建可移植代码(.net标准2.0)? - How to create portable code (.net standard 2.0) for a Raspberry Pi 3 using Windows 10 IoT (UWP)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM