【问题标题】:.NET windows forms project and UWP project that both reference .NET Standard class lib gets:引用 .NET Standard 类库的 .NET windows 窗体项目和 UWP 项目:
【发布时间】:2019-06-26 13:55:03
【问题描述】:
  1. 我将这两个应用程序(框架 4.6.1)添加到同一个解决方案中
  2. 添加了 .NET Standard 2.0 类库
  3. 将这两个应用都引用到类库。

...得到:

错误...

错误 NU1201 Project .NET Standard VB ClassLibrary1 与 uap10.0.15063 (UAP,Version=v10.0.15063) 不兼容。 Project .NET Standard VB ClassLibrary1 支持:netstandard2.0 (.NETStandard,Version=v2.0) UWP App1 C:\PRIMARY\WORK\3 WindowsApp3\UWP App1\UWP App1.csproj 1

但应用程序目标框架下拉仅允许 .NET Framework x.x.x
而 .NET Standard 类库 Target framework 下拉列表只允许 .NET Standard x.x
所以我无法让框架匹配。

(这是在 Windows 10 Pro 上的 Visual Studio 2017 Pro 上。)

所有错误...

这里是2个app项目和class lib项目的属性...


【问题讨论】:

    标签: c# .net visual-studio uwp


    【解决方案1】:

    您需要将 UWP 项目的最低版本设置为 16299(或更高)。 Build 16299 是第一个支持 NET Standard 2.0 的版本。错误消息指出,早期版本的 UWP 不兼容。

    【讨论】:

      猜你喜欢
      • 2022-11-17
      • 2017-01-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多