我开发了一个 GTK# 应用程序,它使用 webkit-sharp 来编辑电子邮件模板。此应用程序可在 Linux 中运行,但在 Windows 中运行时却无法运行。我在 Windows 中使用来自 Linux 的 webkit-sharp.dll。我得到的错误是:
System.TypeInitializationException: The type initializer for 'WebKit.WebView' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'webkit-1.0': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at WebKit.Download.webkit_download_get_type()
at GtkSharp.WebkitSharp.ObjectManager.Initialize()
at WebKit.WebView..cctor()
--- End of inner exception stack trace ---
at WebKit.WebView..ctor()
at MainWindow..ctor()
我猜 webkit-sharp.dll 只包装了 WebKit 的原生库。我不知道从哪里获得“webkit-1.0”。是否有针对 GTK# 的特定于 Windows 的 webkit-sharp.dll?
最佳答案
我就是这么做的。我猜 webkit windows dll 不使用 gtk 作为渲染引擎。 我所做的是安装 suse mingw32 端口提供的 libwebkit dll 及其所有依赖项。
您可以看到完整的依赖项列表 here
在做的时候(大约一年前)渲染并不完美,但可能有所改进。
关于c# - GTK# + WebKit + Windows,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5563336/