如何使用Scintilla的.NET的C#项目? [英] How to Use Scintilla .NET in C# Project?

查看:1233
本文介绍了如何使用Scintilla的.NET的C#项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用Scintilla的.NET中的一个项目(我希望有一个好的编辑器+语法高亮,等等)。不幸的是,当我引用的二进制文件在我的项目,我似乎无法实际使用Scintilla的控制。我得到两个不同的错误。

I am attempting to use Scintilla .NET in a project (I want a good editor + syntax highlighting, etc). Unfortunately, when I reference the binaries in my project, I can't seem to actually use the Scintilla controls. I get two different errors.

    当添加
  1. 首先发生 SciLexer.dll作为参考到我 项目。我得到一个消息,说: 引用SciLexer.dll可能 不添加。请确保 文件是可访问,而且它是一个 有效的程序集或COM组件。

  1. The first happens when adding SciLexer.dll as a reference to my project. I get a message that says: A reference to SciLexer.dll could not be added. Please make sure the file is accessible, and that it is a valid assembly or COM component.

当我尝试从ScintillaNET.dll使用的控件时,会出现第二个错误。如果我尝试组件拖动到表单中,我得到以下信息:无法创建组件Scintilla的。该错误消息如下:System.ComponentModel.Win32Exception:%1不是在ScintillaNet.Scintilla.get_CreateParams()

The second error occurs when I try to use the controls from ScintillaNET.dll. If I try to drag the component into a form, I get the following message: Failed to create component Scintilla. The error message follows: System.ComponentModel.Win32Exception: %1 is not a valid Win32 application at ScintillaNet.Scintilla.get_CreateParams()

任何帮助,无论这些问题是很多AP preciated。为了记录在案,我正在运行的Visual Studio 2008在64位Windows 7平台上运行。

Any help with either of these problems would be much appreciated. For the record, I am running Visual Studio 2008 running on a 64-bit Windows 7 platform.

感谢。

推荐答案

这是一个有点一段时间,因为我用Scintilla的,但我的理解是,SciLexer.dll是一个完全原生的DLL,这就是为什么你不能添加提到它从Visual Studio。

It's been a little while since I used Scintilla, but my understanding is that SciLexer.dll is an entirely native DLL, which is why you can't add a reference to it from Visual Studio.

相反,你应该安排为SciLexer.dll在运行时出现在正确的目录,以便它可以通过ScintillaNET.dll加载。要做到这一点,最安全的方法是将SciLexer.dll上的文件添加到您的Visual Studio项目作为一个纯文本文件(而不是作为参考),然后更改的属性把它复制到输出目录时,项目的生成。

Instead, you should 'arrange' for SciLexer.dll to appear in the right directory at runtime so that it can be loaded by ScintillaNET.dll. The safest way to do this would be to add SciLexer.dll to your Visual Studio project as a plain file (not as a reference), then change the properties on the file to have it copied to the output directory when your project is built.

既然你是在64位,我希望您需要构建您的应用程序专为32位,而不是值为anycpu 。正如我所说,它已经有一段时间,因为我这样做,但是当我这样做,Scintilla的只有32位二进制文​​件。

Given that you're on 64-bit, I expect that you'll need to build your app specifically as 32-bit and not AnyCPU. As I say, it's been a while since I did this, but when I did, Scintilla only had 32-bit binaries.

这篇关于如何使用Scintilla的.NET的C#项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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