简体   繁体   English

PreMailer“找不到方法”(AngleSharp.Dom.IElement.RemoveAttribute)

[英]PreMailer “Method Not Found” (AngleSharp.Dom.IElement.RemoveAttribute)

I have this code which inlines CSS using PreMailer; 我有这个使用PreMailer内联CSS的代码;

PreMailer.Net.PreMailer cleanser = new PreMailer.Net.PreMailer(htmlString);
PreMailer.Net.InlineResult result = cleanser.MoveCssInline(ignoreElements: ".ignore");
return result.Html

But I'm getting this exception: 但我得到了这个例外:

Method not found: 'Void AngleSharp.Dom.IElement.RemoveAttribute(System.String)' 找不到方法:'Void AngleSharp.Dom.IElement.RemoveAttribute(System.String)'

Stack Trace 堆栈跟踪

[MissingMethodException: Method not found: 'Void AngleSharp.Dom.IElement.RemoveAttribute(System.String)'.]
PreMailer.Net.StyleClassApplier.ApplyStyles(IElement domElement, StyleClass clazz) +0
PreMailer.Net.StyleClassApplier.ApplyAllStyles(Dictionary`2 elementDictionary) +125
PreMailer.Net.PreMailer.MoveCssInline(Boolean removeStyleElements, String ignoreElements, String css, Boolean stripIdAndClassAttributes, Boolean removeComments) +241

The answer is probably really obvious but I'm just not clicking on. 答案可能很明显,但我只是没有点击。

AngleSharp: v0.9.9 AngleSharp:v0.9.9

PreMailer: v1.5.4 PreMailer:v1.5.4

There has been an update released for PreMailer. 已经为PreMailer发布了更新。 Upgrade to 1.5.5 to resolve this issue! 升级到1.5.5以解决此问题! No rollback for AngleSharp required! 无需回滚AngleSharp!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM