XAM160 'Working with SQLite and Mobile Data [XAM160]' Windows Phone Crash

I got an crash in

dbConn = new SQLiteConnection(sqlitePlatform, dbPath);

'An exception of type 'System.IO.FileNotFoundException' occurred in SQLite.Net.Platform.WindowsPhone8.DLL but was not handled in user code'
'Additional information: The specified module could not be found. (Exception from HRESULT: 0x8007007E)'

running the XAM160 part 3 and 4 on a Windows Phone device. I thought SQLiteConnection should create the missing database file if nothing is there?
Anybody having the same issue?

Posts

  • RobGibbensRobGibbens USMember, Xamarin Team, University, XamUProfessors, Developer Group Leader Xamurai
    edited September 2014

    Juergen,
    Did you install the Visual Studio extension(s)?

    Windows Phone 8

    Windows Phone 8.1

    AND added the reference to the project?

  • JuergenKollerJuergenKoller DEUniversity ✭✭

    Thanks Rob, I didn't get the 'Start' solution running and was hoping to use the 'Completed' solution to find my error and didn't check the reference in the completed solution again. I was misled by the error message System.IO.FileNotFoundException. If I read it now it doesn't mean my local database file but the SQLite for Windows Phone extension? Is this correct?

  • RobGibbensRobGibbens USMember, Xamarin Team, University, XamUProfessors, Developer Group Leader Xamurai

    Correct. That's usually the issue with Windows Phone. You need to add that one extra reference.

    The database file itself WILL be created by sqlite.net.

Sign In or Register to comment.