不能在 Mono.Android 和 Xamarin.ios 中使用 System.drawing.common [英] Can not use System.drawing.common in Mono.Android and Xamarin.ios

查看:35
本文介绍了不能在 Mono.Android 和 Xamarin.ios 中使用 System.drawing.common的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目中使用 System.drawing.common,它在 .net core 中运行良好.

I am using System.drawing.common in my project, and it worked fine in .net core.

现在我尝试在 Mono.Android 项目和 Xamarin.ios 项目中使用 System.drawing.common.出现了一些问题:

Now I am trying to use System.drawing.common in Mono.Android project and Xamarin.ios project. Some problem occured:

1、我创建了一个 Mono.Android lib 项目,并使用 NuGet 安装 System.drawing.common.好像成功了,但是安装后,在参考"列表中找不到System.drawing.common.我尝试使用System.Drawing.Bitmap",但找不到 Bitmap 类.

1, I create a Mono.Android lib project, and install System.drawing.common with NuGet. It seems to be successful, but after installing, I can not find System.drawing.common in the "reference" list. I tryed to use "System.Drawing.Bitmap", but can not find Bitmap class.

2、我检查了包文件夹,比如\packages\System.Drawing.Common.4.5.0-preview2-26406-04\lib".在netstandard2.0"文件夹中,有一个DLL.在MonoAndroid10"文件夹中,有一个名为."的0KB文件.

2, I checked the package folder, such as "\packages\System.Drawing.Common.4.5.0-preview2-26406-04\lib". In the "netstandard2.0" folder, there is a DLL. In "MonoAndroid10" folder, there is a 0KB file named ".".

那么,如何在 Mono.Android 和 Xamarin.ios 中使用 System.drawing.common?

So, how can I use System.drawing.common in Mono.Android and Xamarin.ios?

推荐答案

根据这个 问题,看来您需要手动将 System.Drawing.Common.dll 复制到输出文件夹.或者您可以尝试更新您的 VS.

According to this Issue, it seems you need to get copy System.Drawing.Common.dll manually to the output folder. Or you could try to update your VS.

这篇关于不能在 Mono.Android 和 Xamarin.ios 中使用 System.drawing.common的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆