dotConnect for oracle problem after AppHost test on mono



mono version: 4.4.2

When test B is executed after A I am getting following error:

System.ArgumentException : The ADO.NET provider with invariant name ‘Devart.Data.Oracle’ is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details.
----> System.ArgumentException : Unable to find the requested .Net Framework Data Provider. It may not be installed

When test A is executed solo:

The specified metadata path is not valid

which is expected, because “anything” is not a valid metadata.

It looks like app.config is somehow ignored, but this does not affect all my assemblies. I have extracted this one which does not work, I cant find why.

Note Oracle is not a supported provider (we don’t develop or maintain it ourselves), but the last community maintainers published some notes about the Oracle provider on OrmLite’s home page where it requires an install of ODP.NET.

Not sure if this helps you but we use a mixture of Devart and OrmLite but we only tend to use the Devart.Data.Oracle.OracleConnection and Devart.Data.Oracle.OracleCommand classes and OrmLite/Dapper does the rest.

I’m using dotConnect for Oracle with EntityFramework. During normal application run everything is ok.

In test from my first post the problem exists only on mono. I normally create DbContext, but I have changed this to EntityConnection for example purposes.

I tried now to run these tests on mono on windows and result is same as on linux.

Devart’s support sent me this workaround in August:

    private static void InitDbProvFactEntry()
        bool DevartProviderRegistered = false;
        var dataSet = System.Configuration.ConfigurationManager.GetSection("") as System.Data.DataSet;
        foreach (System.Data.DataRow dr in dataSet.Tables[0].Rows)
            if ((string)dr[2] == "Devart.Data.Oracle")
                DevartProviderRegistered = true;
        if (!DevartProviderRegistered)
            dataSet.Tables[0].Rows.Add("dotConnect for Oracle"
                , "Devart dotConnect for Oracle"
                , "Devart.Data.Oracle"
                "Devart.Data.Oracle.OracleProviderFactory, Devart.Data.Oracle, Version=" + Devart.Data.Oracle.ProductInfo.Version + ", Culture=neutral, PublicKeyToken=09af7300eec23701");

    private static void InitEFEntry()
        DbConfiguration.SetConfiguration(new Devart.Data.Oracle.Entity.OracleEntityProviderServicesConfiguration());


It works.
It’s not a problem to have this code in my solution, but this isn’t normal behaviour I guess.