Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Type or namespace 'Sqlite' could not be found in SQLite.cs

I have a Windows Phone 8 app that utilizes SQLite. The app has many database functions, and includes a sqlite database file which, upon running the app, is copied to the local folder and accessed. All of this worked with no problem until I first switched to release build, upon which it did not work.

I "fixed" this by deleting all NuGet references and .dll references and started over following the steps here:A Workaround to Use SQLite in a Windows Phone 8 Application

I am having a frustrating problem where, after switching from debug to release build, or vice versa, 'Sqlite' is once again no longer recognized.

I get the following errors:

The type or namespace name 'Sqlite' could not be found (are you missing a using directive or an assembly reference?)

These errors are coming from SQLite.cs, specifically these lines:

using Sqlite3 = Sqlite.Sqlite3;
using Sqlite3DatabaseHandle = Sqlite.Database;
using Sqlite3Statement = Sqlite.Statement;

How is this possible? I saw some similar questions on here, but all of them simply said to delete and re-add the references and the problem inexplicably goes away. This is not working for me.

like image 786
Danny Johnson Avatar asked Mar 08 '13 17:03

Danny Johnson


1 Answers

Follow this article to configure your project. Also explained here

Second you will need to go to the GITHUB website and download the code for SQLite-net-wp8. This is a c++ project you will need to access a sqlite database.

Make you sure you set Conditional compilation symbols: USE_WP8_NATIVE_SQLITE and release is x86 or ARM.

Tested on VS Profesional 2013, Release build (x86, ARM)

like image 135
Jan Smuda Avatar answered Oct 01 '22 00:10

Jan Smuda