无法加载文件或程序集"Oracle.DataAccess"-标记视图 [英] Could not load file or assembly 'Oracle.DataAccess' - Markup View

查看:150
本文介绍了无法加载文件或程序集"Oracle.DataAccess"-标记视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从安装了最新版本的ODAC 11.2.0.2.1以来,我遇到了一个奇怪的问题.我安装了32位和64位版本,因为我为两种体系结构都开发了应用程序.我的电脑是Win 7 64位.

I am having a strange problem since installing the latest version of ODAC, 11.2.0.2.1. I installed both the 32-bit and 64-bit versions because I develop applications for both architectures. My computer is Win 7 64-bit.

由于安装了ODAC并引用了新的64位版本的ODP.NET,因此,当我在标记视图中查看所有aspx页面和母版页时,我在Visual Studio 2010中的一个Web应用程序项目将对所有aspx页面和母版页发出以下警告.

Since installing ODAC and referencing the new 64-bit version of ODP.NET, one of my web application projects in Visual Studio 2010 gives the following warning for all aspx pages and masterpages when I view them in Markup View.

ASP.NET runtime error: Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.

该警告仅限于标记视图".该Web应用程序可以构建并正常运行.我尝试清理VS Temporary ASP.NET文件,但是并没有解决问题.我在整个应用程序中删除了对Oracle.DataAccess的所有引用,然后重新阅读它们以确保所有引用都是正确的.该Web应用程序已编译为任何CPU",但它使用64位Oracle.DataAccess.我创建了一个新项目,并引用了相同的项目和dll,但没有收到警告,因此它似乎特定于此项目文件.

The warning is limited to Markup View. The web application builds and runs fine. I tried cleaning the VS Temporary ASP.NET Files, but that did not fix the issue. I removed all references to Oracle.DataAccess throughout my application, and then readded them to be sure that all the references were correct. The web app is compiled to 'Any CPU' but it uses the 64-bit Oracle.DataAccess. I created a new project, and referenced the same projects and dlls, and I do not get the warning, so it appears to be specific to this project file.

有什么想法可以让我在标记视图"中得到警告吗?

Any ideas why I would get the warning when in Markup View?

推荐答案

结果是ODAC 11.2.0.2 xcopy安装程序未正确注册所有dll(请参阅底部答案).结果,Oracle.DataAccess.dll(64位)被复制到BIN目录中,而VS在标记视图中引起警告时,VS试图加载它.手动注册丢失的DLL并重新启动后,我不再遇到问题.

Turns out the ODAC 11.2.0.2 xcopy installer doesn't correctly register all of the dlls (See bottom answer). As a result, Oracle.DataAccess.dll (64bit) was being copied into the BIN directory, and VS was trying to load it when in Markup View causing the warning. After manually registering the missing DLLs and rebooting, I am no longer having the problem.

这篇关于无法加载文件或程序集"Oracle.DataAccess"-标记视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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