如何解决在使用C#在ASP.NET中发布时无法加载程序集的问题? [英] How to resolve the issue of assembly not loading while publishing in ASP.NET with C#?

查看:61
本文介绍了如何解决在使用C#在ASP.NET中发布时无法加载程序集的问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以毫无问题地构建和运行我的应用程序。我正在使用Visual Studio 2017使用c#在asp.net中开发。



但是在发布时我得到了可以加载程序集Oracle.dataaccess dll的例外。尝试以不正确的格式加载程序。



我尝试使用任何CPU和64位模式以及调试/释放模式进行发布。使用Visual Studio 2017以预编译模式完成发布



我尝试过:



I am able to build and run my application without any issue. I am developing in asp.net with c# using Visual Studio 2017.

But on publishing I am getting the exception of Could load assembly Oracle.dataaccess dll. An attempt was made to load the program in an incorrect format.

I tried publishing with any CPU and 64 bit mode and in both debug/release mode. Publishing is done with pre compiled mode using Visual Studio 2017

What I have tried:

I am developing in asp.net with c# using Visual Studio 2017.
I tried building with any CPU and 64 bit and in both debug/release mode. Publishing is done with  pre compiled mode  using Visual Studio 2017

推荐答案

您是否在Web服务器上安装了适当版本的Oracle客户端?需要使任何Oracle代码都能正常工作。
Did you install an appropriate version of the Oracle Client on your web server? It's required to get any Oracle code to work.


这篇关于如何解决在使用C#在ASP.NET中发布时无法加载程序集的问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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