我们使用 Scintilla.NET (1.7) 组件开发了一个 WinForm 应用程序,该组件使用 SciLexer.dll(未管理)。在运行时,我们分发 32 位和 64 位 SciLexer.dll,并在应用程序启动时加载正确的(一切正常)。
在我们的新开发环境(Windows 7 64 位)上,我们所有的解决方案都可以正常构建和运行,但是 WinForm 可视化设计器不会加载我们使用 Scintilla.NET 的表单/控件,因为它无法加载正确的 SciLexer.dll:
Window class name is not valid.
at System.Windows.Forms.NativeWindow.WindowClass.RegisterClass()
at System.Windows.Forms.NativeWindow.WindowClass.Create(String className, Int32 classStyle)
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at Scintilla.ScintillaControl.SendMessageDirect(UInt32 msg, IntPtr wParam, IntPtr lParam)
at Scintilla.ScintillaControl.SendMessageDirect(UInt32 msg)
at Scintilla.ScintillaControl.get_CodePage()
at Scintilla.ScintillaControl..ctor(String sciLexerDllName)
at Scintilla.ScintillaControl..ctor()
Visual Studio 2008 在哪里寻找非托管库?我尝试将 64 位 SciLexer.dll 放在 SysWOW64 中,在引用 ScintillaNET.dll 的文件夹中,在 PATH 系统变量中添加一个文件夹,在项目中添加一个文件夹引用,但我一直收到此错误。
任何帮助表示赞赏。