Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/267.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
c#-探测私密路径无效_C#_Database_Oracle - Fatal编程技术网

c#-探测私密路径无效

c#-探测私密路径无效,c#,database,oracle,C#,Database,Oracle,在app.config中,我正在使用 <configuration> <configSections> <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >

在app.config中,我正在使用

<configuration>
<configSections>
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
        <section name="SMSGateway.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </sectionGroup>
</configSections>
<startup> 
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <probing privatePath="OracleLibs" />
</assemblyBinding>
</runtime>
</configuration>

要在OracleLibs子文件夹中加载dll,但运行程序时出现错误:

OracleConnection错误:System.TypeInitializationException:“Oracle.DataAccess.Client.OracleConnection”的类型初始值设定项引发异常。-->System.DllNotFoundException:无法加载DLL“OraOps12.DLL”:找不到指定的模块。(来自HRESULT的异常:0x8007007E)


任何人都有办法解决这个问题。谢谢

首先,您正在引用.dll吗

第二,这是否解决了你的问题


第三,这是否解决了你的问题

如果我把dll放在根文件夹中,程序就会工作。但我想把它放在一个子文件夹里,以便更有条理。我的机器上没有oracle客户端。在这个项目中,我使用的是第三个libs@QuangTrườ恩古伊ễn您是否尝试过(在解决方案资源管理器中)右键单击“引用”,选择“添加引用”,单击“浏览”,然后导航到所需位置的.dll?@Quang Trườ吴恩圭ễn、 我试图实现同样的目标,即在根文件夹外组织dll,但当我这样做时,exe无法找到它们。我使用C++ exe调用.NETCOM互操作DLL。我在本主题中找到了答案:<代码> var dLordOrth=“c/:/Op/PATH”;Environment.SetEnvironmentVariable(“PATH”,Environment.GetEnvironmentVariable(“PATH”)+“;”+dllDirectory)