Search code examples
c#sqliteentity-frameworkdevartdotconnect

cannot query for data in devart dotconnect for sqlite


                using (var ctx = new TIS2APPContext())
                {
                    var test = ctx.RSTOPs.ToArray();
                }

I have just downloaded dotconnect for sqlite (trial version) and I have the above code. An exception "Method not found: 'System.String Devart.Data.SQLite.SQLiteConnectionStringBuilder.get_LicenseKey()'." is thrown when I run into ctx.RSTOPs.ToArray();.

May I know what I have done wrong? Thanks in advance.


Solution

  • With Target framework=.NET Framework, the first location CLR looks for the assembly is GAC. So, your development environment works with .NET Framework Devart.* assemblies although you installed .NET Standard Devart.* assemblies to the project via NuGet.

    A solution is to reinstall dotConnect for SQLite in your development environment and select the "Do not install assemblies in the GAC" option in Setup Wizard. And, set the License Key parameter in your connection string.