Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Test projects and SQLite #108

Open
JasonBSteele opened this issue May 26, 2016 · 0 comments
Open

Test projects and SQLite #108

JasonBSteele opened this issue May 26, 2016 · 0 comments

Comments

@JasonBSteele
Copy link

We have a Test project in XS which references MvvmCross.Plugins.Sqlite.Wpf and has a test setup which includes:

using MvvmCross.Plugins.Sqlite.Wpf;

var connectionFactory = new WindowsSqliteConnectionFactory();
Ioc.RegisterSingleton<IMvxSqliteConnectionFactory>(connectionFactory);

When the tests try to connect to the database they get the error:
SetUp : System.TypeInitializationException : The type initializer for 'SQLite.Net.Platform.Win32.SQLiteApiWin32Internal' threw an exception.
----> System.DllNotFoundException : kernel32

We managed to get this working on Windows by installing System.Data.SQLite but it continues to fail in OS X.

I wondered if we should be using SQLite.Net.Platform.Generic and ensuring that we get a copy of sqlite3.dll into the bin folder but it doesn't look like the plugin currently supports this.

I looked at MvvmCross.Plugins.Sqlite.WindowsCommon hoping it would use the generic platform but instead it uses SQLitePlatformWinRT, which seems odd as this is also used by MvvmCross.Plugins.Sqlite.WindowsUWP. Is that correct?

What would you suggest we do for our Test projects which would ideally work on both Windows and OS X?

Many Thanks,
Jason

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant