I'm developing a C# application with .NET Framework 4.0, Entity Framework 6.1.3 and Sqlite 1.0.96.0.
I have an assembly that use SQLite
, MyCompany.Data.Sqlite.Common
, installed on GAC (System.Data.SQLite
is also installed on GAC).
I have two errors:
'Entity Framework used the default instance DbConfiguration before the type was detected' SQLiteConfiguration '. An instance of 'SQLiteConfiguration' should be set at the beginning of the application before using any feature or Entity Framework must be registered in the configuration file of the application. See http://ift.tt/1xxp2nE for more information. '
To fix this, I have add the following in App.config
:
<entityFramework codeConfigurationType="MyCompany.Data.Sqlite.Common.SQLiteConfiguration, MyCompany.Data.Sqlite.Common">
But, after adding this to App.config
the program it doesn't load it from GAC.
I have to copy the same dll into EXEC folder to load it and run the program.
I think this is not a version number problem or the dll has a bad format, because I'm using the same dll in GAC.
I have also added this to App.config
:
<dependentAssembly>
<assemblyIdentity name="MyCompany.Data.Sqlite.Common" publicKeyToken="db937bc2d44ff139" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.0.0" newVersion="1.0.0.0" />
</dependentAssembly>
But I have to copy the dll to application's folder.
Any idea?
Aucun commentaire:
Enregistrer un commentaire