代码改变世界

Oracle Explorer 无法打开 : Pakage load faliure Package

2007-03-21 00:39  晓风残月  阅读(1222)  评论(1编辑  收藏  举报

今天安装 Oracle Developer Tools for Visual Studio .NET with ODAC 10.2.0.2.20,一切顺利,当从VS中打开 Oracle Explorer 却报错:
" Pakage load faliure Package 'Oracle developer tools for visual studio .net has failed to load properly (GUID={D601BB95-E404-4A8E-9F24-5C1A462426CE}). Please contact the package vendor for assistance. Application retart is recomended, due to possible environment corruption. Would you like to diasable loading this package in the future? You may use 'devenv/resetskippkgs' to re-enable package loading. "



http://forums.oracle.com 找了几个帖子:

Announcement: "Package Load Failure" error with ODT and Visual Studio 2005 
http://forums.oracle.com/forums/ann.jspa?annID=258
This seems to be caused by an assembly mismatch issue. The Oracle.DataAccess.dll version on your machine is 1.102.2.20 whereas it should be 2.102.2.20. You can try a couple of things to see if it resolves the issue on your machine.

1. Execute the following command from a command prompt:

gacutil /i <Oracle Home>\odp.net\bin\2.x\Oracle.DataAccess.dll
where <Oracle Home> is the Oracle Home directory where you installed ODT 2005. For example, <Oracle Home> on my machine is c:\oracle\product\10.2.0\client_1.

OR

2. Deinstall ODP.NET 1.x from your machine (if you're not using it) and install ODP.NET 2.0 in the same Oracle Home.

------------------

ODP.Net Installation error 
http://forums.oracle.com/forums/thread.jspa?messageID=1720939

------------------

 ODT 10.2.0.2.10 beta - Package Load Failure VS2005.  http://forums.oracle.com/forums/thread.jspa?threadID=380436&tstart=0

大概的问题是:
ODP.NET 默认将 for .net 1.x 也安装了,导致 .net 2.0 无法加载正确版本的程序集,

解决:
重新安装 ODP.NET,如果只有 VS2005,去掉 for .net 1.x 的组件:
如下图,需要注意的,先要取消第三个复选框(Oracle Developer Tools for ... 20003)才可以取消第一个复选框(Oracle Data Provider for .NET 1.x ...)