惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
N
Netflix TechBlog - Medium
Google Online Security Blog
Google Online Security Blog
月光博客
月光博客
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
V
V2EX
腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
M
MIT News - Artificial intelligence
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
Apple Machine Learning Research
Apple Machine Learning Research
aimingoo的专栏
aimingoo的专栏
博客园 - 三生石上(FineUI控件)
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
The Cloudflare Blog
Blog — PlanetScale
Blog — PlanetScale
F
Full Disclosure
G
Google Developers Blog
罗磊的独立博客
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
A
About on SuperTechFans
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队
GbyAI
GbyAI
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
The Register - Security
The Register - Security
U
Unit 42
D
Docker
Martin Fowler
Martin Fowler
L
LINUX DO - 热门话题
NISL@THU
NISL@THU
阮一峰的网络日志
阮一峰的网络日志
C
Cybersecurity and Infrastructure Security Agency CISA
博客园_首页
Google DeepMind News
Google DeepMind News

博客园 - gucs

《应用框架的设计与实现——.NET平台》书评 《WCF Unleashed》的 AzRoles 演示代码 Tech Ed 2009,胡思乱想 Mac 双系统的时间设置问题 使用 gVim 遇到的第一个问题 Google notebook for Firefox 3.5 Fiddler & localhost 关于 TableLayoutPanel 的 Scroll bar Powerdesigner 12.5 对 SQL Server 2005 做反向工程时发生错误 VisualSVN Server 的 Apache 配置 ExplorerXP 在 Vista 下的设置 ReSharper 2.0.4 安装时的 1722 错误 禁用 Nero ShowTime 快捷键 使用 ModalPopupExtender 和 UpdatePanel 应注意的问题 手动注册 DevExpress 8.2.3 控件到 Visual Studio 工具箱 PPStream caused an Access Violation (0xc0000005) in module VSFilter.dll at 001b:07610441. 隐藏 Windows Vista 的 Explorer 菜单栏 ReadOnly Controls do not post back properly 使用 ExtJs Extender Controls 遇到的第一个错误
NHibernate 和 ODP.NET
gucs · 2008-10-09 · via 博客园 - gucs

十一前在国内部帮忙,使用 ODP.NET 连接 Oracle 9i。但是在配置 NHibernate Driver 时遇到了一些问题,使用 NHibernate.Driver.OracleDataClientDriver 将抛出如下异常:

The IDbCommand and IDbConnection implementation in the assembly Oracle.DataAccess could not be found. Ensure that the assembly Oracle.DataAccess is located in the application directory or in the Global Assembly Cache. If the assembly is in the GAC, use <qualifyAssembly/> element in the application configuration file to specify the full name of the assembly.

安装时,ODP.NET for 9i 默认是将 DLL 注册到 GAC 中的,Project 中引用后 DAAB 是好用的,NH 中应该不会出问题才对,怎么会提示找不到 Oracle.DataAccess 呢?

仔细一看提示信息才知道,如果使用了 GAC,就要使用 qulifyAssembly 来解决该问题,具体请参加  MSDN 中的相关章节

其实,除了采用上面的方法之外,我们还可以直接将 Oracle.DataAccess.dll 文件 copy 到 Lib 文件夹下,再在 Project 中引用 Lib 文件夹下的 Oracle.DataAccess 文件。这样,重新编译后,将在 Bin 文件夹下找到该问题,运行时就不会出现上面的错误信息了。

注:为了便于项目管理,我们在建立 Solution 时,其下包含一个 Lib 文件夹,并将所有用到的第三方 DLL 统统放在 Lib 中。