无法从程序集“System.Drawing, Version=4.0.0.0"的加载类型“System.Drawing.Font"加载类型 [英] Cannot load type from load type 'System.Drawing.Font' from assembly 'System.Drawing, Version=4.0.0.0

查看:43
本文介绍了无法从程序集“System.Drawing, Version=4.0.0.0"的加载类型“System.Drawing.Font"加载类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有类似的问题,但我找不到答案,所以我会问一个特定的问题.我有一个简单的 .net 核心控制台应用程序.我正在使用 Syncfusion.DocIO.Base 和 Syncfusion.Core 程序集从这样的流中创建一个 WordDocument:

I know there are similar questions but i couldn't find the answer so i will ask a specif question. I have a simple .net core console application. I'm using the Syncfusion.DocIO.Base and Syncfusion.Core assemblies to create a WordDocument from a stream like this:

var word = new WordDocument(rtfStream, FormatType.Rtf);

在这里我收到错误消息:无法从程序集System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"中加载类型System.Drawing.Font".'

here i get the error message: Could not load type 'System.Drawing.Font' from assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.'

你知道我在哪里可以解决这个问题吗?`

Do you have any idea where can i look to reslove this problem?`

推荐答案

System.Drawing.Font 类型在 .NET Core 2.0 中不可用.虽然 .NET Core 有一个 System.Drawing.dllSystem.Drawing.Primitives.dll,但它们并不像使用.NET Framework 的完整绘图功能.

The type System.Drawing.Font is not available in .NET Core 2.0. While .NET Core has a System.Drawing.dll and System.Drawing.Primitives.dll, those do not contain this type just as many more expected by libraries making use of the full .NET Framework's drawing capabilities.

计划在 .NET Core 2.1 中支持这些功能,请参阅 相关的 GitHub 问题.

Support for these features is planned for .NET Core 2.1, see the related GitHub issue.

这篇关于无法从程序集“System.Drawing, Version=4.0.0.0"的加载类型“System.Drawing.Font"加载类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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