嵌入式firebird的调用限制
我已经下载并尝试通过 firebird 的 .net 提供程序( FirebirdSql.Data.FirebirdClient.dll )在 .net/mono 环境中使用嵌入式 firebird (本机 fbembed.dll 及其助手)。
我遇到的主要问题是嵌入式 firebird 组件似乎要求所有内容都位于同一项目的同一目录中(直到应用程序入口点代码)。当我尝试创建一些依赖于本机 fbembed.dll 和 .net 提供程序(并位于同一目录中)的托管库 dll 代码,然后从驻留在其他位置的托管代码(另一个目录中的另一个项目)调用该托管库 dll 时) ....一切都爆炸了,说找不到 fbembed.dll ...即使通过提供程序实际调用 fbembedd.dll 的托管库代码与 fbembed.dll 位于同一目录中。
简而言之 ...“在同一目录中”的要求不仅扩展到立即调用代码,而且一直通过调用堆栈到达入口点本身。
[注意:我已尝试使用 Visual C# 2010 .net 4.0 、 Monodevelop 2.4 、 mono 2.8 、 mono 2.10 、 .net firebird 提供程序版本 2.6.5 ... 而不触及本机 fbembed.dll 目录中的 .config 文件 ]
将最终调用方法(即 Main 方法)引入包含 fbembed.dll 和 .net 提供程序的目录后,此问题立即消失 FirebirdSql.Data.FirebirdClient.dll
I have downloaded and am trying to use the embedded firebird (the native fbembed.dll and its helpers) in .net/mono environment via firebird's .net provider (the FirebirdSql.Data.FirebirdClient.dll ).
The main issue I am stuck with is that the embedded firebird components seem to require that everything be in the same directory in the same project ( upto to the application entry point code). The moment I try to create some managed library dll code dependent on (and located in the same directory as) the native fbembed.dll and .net provider and then call that managed library dll from managed code residing somewhere else (another project in another directory) .... everything blows up saying that fbembed.dll could not be found ... even when the managed library code that actually calls on the fbembedd.dll via the provider is in the same directory as the fbembed.dll.
IN SHORT ... the requirement to be "in the same directory" not only extends to the immediately calling code , but all the way through the call stack reaching the entry point itself.
[Note: I have tried this with Visual C# 2010 .net 4.0 , Monodevelop 2.4 , mono 2.8, mono 2.10, .net firebird provider version 2.6.5 ... without touching .config file in the native fbembed.dll directory ]
This issue immediately disappears upon bringing the ultimate calling method (i.e. Main method) into the directory containing the fbembed.dll and the .net provider FirebirdSql.Data.FirebirdClient.dll
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在连接字符串(或 FbConnectionStringBuilder 类)中使用 ClientLibrary 参数,将 ADO.NET 提供程序指向 fbembed.dll 所在的位置。
Use a ClientLibrary parametr in connection string (or in FbConnectionStringBuilder class), to point ADO.NET provider, to where the fbembed.dll is.