I migrated a simple application from DAAB 5.0 to 6.0 and after migration, the code throws an exception when calling
Database db = DatabaseFactory.CreateDatabase("default");
The exception message was:
Database provider factory not set for the static DatabaseFactory. Set a provider factory invoking the DatabaseFactory.SetProviderFactory method or by specifying custom mappings by calling the DatabaseFactory.SetDatabases method.
My config file setting is:
<add name="default" connectionString="Data Source=(local);database=MyAppDB;Integrated Security=True;" providerName="System.Data.SqlClient" />
I tried to NuGet the EntLib libraries again. I have tried Cleaning the solution and manually deleted any traces of 5.0 dlls in my bin folder. I have tried creating a new project to test. The same error exist.
The error does not occur when I revert back to EntLib 5.