开发者

probing assemblies

开发者 https://www.devze.com 2023-01-24 20:41 出处:网络
Few years ago I\'ve developed a windows service app (VB.NET framework 1.1) which was using the System.Data.OracleClient to access an Oracle database.

Few years ago I've developed a windows service app (VB.NET framework 1.1) which was using the System.Data.OracleClient to access an Oracle database.

Since that driver has given me lots of troubles I wanted to reference the oracle dataprovider (Oracle.DataAccess.dll) which works much better.

On my PC everything works fine.

The problem is when I try to publish my app on the server (windows 2000).

I can't install the n开发者_开发百科ew oracle data provider on that server and there is an old installation of oracle 9.0 (my app references oracle 9.2).

I've copied (no installation) the entire directory (C:\oracle\ora92\bin) from my pc to the server but I don't know how to reference the Oracle data provider. I know that is not an "clean" way to do things but I don't have the possibility to install new software.

I've seen that if I copy my app (and all the files) in the C:\oracle\ora92\bin folder everything works fine.

I would like to specify that directory as a probing directory of my application. I've tried different solutions found on the web but none of them seem to work.

I would like to set a folder at runtime or in my config file so that my app can use the assemblies there (and all the dependencies).

I can upgrade my app for the framework 2.0.

Thanks

Alberto


Do it the other way around - put the Oracle assemblies into your application's root. Or even better - put the assemblies into the GAC on the server. the utility used for that (gacutil) should run on the server just fine.

maybe this could help you: C#: Custom assembly directory

if everything else fails, you could subscribe to the AssemblyResolve event of the AppDomain:

Assembly Resolve

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号