【发布时间】:2020-03-22 18:25:28
【问题描述】:
在我的 UWP 代码中,我使用了 System.Drawing,如下所示。
using System.Drawing;
在我的 .csproj 项目文件中,如果我将 TargetPlatformMinVersion 设置为 10.0.17763.0,那么一切正常。但如果我将 TargetPlatformMinVersion 设置为 10.0.15063.0,则会出现以下编译错误:
命名空间中不存在类型或命名空间名称“Drawing” '系统'
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17763.0</TargetPlatformVersion>
- <TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
+ <TargetPlatformMinVersion>10.0.15063.0</TargetPlatformMinVersion>
我搜索了 StackOverflow,发帖如下: System.drawing namespace not found under console application 它建议通过这种方式找到 System.Drawing:
项目 -> 右键单击 -> 添加 -> 参考 -> 程序集 -> 搜索 "系统.绘图"
但是我根本没找到,请看下图。如何解决?
【问题讨论】:
-
不,你不能使用 system.Drawing in UWP refer the answer for alternative
标签: uwp