0

umbraco 中的 TinyMCE 拼写检查器存在一个已知问题,我正在尝试解决:http: //issues.umbraco.org/issue/U4-2060

尝试安装推荐的替代解决方案 HunSpellChecker ( http://our.umbraco.org/projects/backoffice-extensions/hunspellchecker )。我在尝试使用它时完全得到了一个不同的错误:

<html> <head> <title>Could not load file or assembly 'log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.</title> <meta name="viewport" content="width=device-width" /> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } @media screen and (max-width: 639px) { pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; } } @media screen and (max-width: 479px) { pre { width: 280px; } } </style> </head> <body bgcolor="white"> <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1> <h2> <i>Could not load file or assembly 'log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.</i> </h2></span> <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br><br> <b> Exception Details: </b>System.IO.FileNotFoundException: Could not load file or assembly 'log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.<br><br> <b>Source Error:</b> <br><br> <table width=100% bgcolor="#ffffcc"> <tr> <td> <code> An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code> </td> </tr> </table> <br> <b>Assembly Load Trace:</b> The following information can be helpful to determine why the assembly 'log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=null' could not be loaded.<br><br> <table width=100% bgcolor="#ffffcc"> <tr> <td> <code><pre> WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. </pre></code> </td> </tr> </table> <br> <b>Stack Trace:</b> <br><br> <table width=100% bgcolor="#ffffcc"> <tr> <td> <code><pre> [FileNotFoundException: Could not load file or assembly &#39;log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=null&#39; or one of its dependencies. The system cannot find the file specified.] Usc.Plugins.HunSpellChecker.HunSpellChecker..cctor() +0 [TypeInitializationException: The type initializer for &#39;Usc.Plugins.HunSpellChecker.HunSpellChecker&#39; threw an exception.] Usc.Plugins.HunSpellChecker.HunSpellChecker..ctor() +0 [TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp; canBeCached, RuntimeMethodHandleInternal&amp; ctor, Boolean&amp; bNeedSecurityCheck) +0 System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp; stackMark) +113 System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark&amp; stackMark) +232 System.Activator.CreateInstance(Type type, Boolean nonPublic) +83 System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark&amp; stackMark) +1136 System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +128 System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +18 System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +60 System.Web.Configuration.HandlerFactoryCache..ctor(String type) +46 System.Web.HttpApplication.GetFactory(String type) +86 System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +262 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +155 </pre></code> </td> </tr> </table> <br> <hr width=100% size=1 color=silver> <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18045 </font> </body> </html> <!-- [FileNotFoundException]: Could not load file or assembly &#39;log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=null&#39; or one of its dependencies. The system cannot find the file specified. at Usc.Plugins.HunSpellChecker.HunSpellChecker..cctor() [TypeInitializationException]: The type initializer for &#39;Usc.Plugins.HunSpellChecker.HunSpellChecker&#39; threw an exception. at Usc.Plugins.HunSpellChecker.HunSpellChecker..ctor() [TargetInvocationException]: Exception has been thrown by the target of an invocation. at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) at System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) at System.Web.Configuration.HandlerFactoryCache..ctor(String type) at System.Web.HttpApplication.GetFactory(String type) at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -->

我安装了 hunspellchecker 的 0.2.0 版本,因为这个站点正在运行 umbraco 4.7.1 我试图找到并安装一个 log4net 包,错误消息类似,但第二句略有更改:定位的程序集的清单定义不匹配程序集参考。

我相信某处可能有对 1.2.11.0 的引用,我需要将其更改为 1.2.10.0,但我看不到任何此类引用发生在哪里。

我必须改变什么才能让 log4net 正确加载?

4

1 回答 1

0

我猜它的预期版本是 1.2.11.0,因为这是与 Umbraco 的更高版本一起分发的版本 - 并且是构建插件的版本。

您总是可以尝试从更高版本的 Umbraco 获取 1.2.11.0 DLL 并使用它。我怀疑使用更高版本会有兼容性问题吗?

或者,您可以在 web.config 文件中尝试绑定重定向。例如,我认为您需要类似的东西

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

  <dependentAssembly>

    <assemblyIdentity name="log4net" publicKeyToken="" />

    <bindingRedirect oldVersion="1.2.0.0-1.3.0.0" newVersion="1.2.10.0" />

  </dependentAssembly>

(我使用免费的JetBrains DotPeek找到了 publicKeyToken 并且它说它为空 - 所以我假设“”会做吗?)

于 2013-09-25T22:25:01.467 回答