Create table in Windows phone 8.1 and get error
Hi guys,
I've just followed these steps to install SQLlite on Visual Studio 2013:
-
Install this extension (https://visualstudiogallery.msdn.microsoft.com/5d97faf6-39e3-4048-a0bc-adde2af75d1b?SRC=VSIDE) for visual Studio and add the reference after that.
-
Change build platform to x86
-
Install sqlite-net by Nuget Manager
-
Install SQLite.Net Extensions by Nuget Manager
-
Define these 2 classes in my project
public class Passport
{
[PrimaryKey]
public string Identifier { get; set; }
public DateTime ExpirationDate { get; set; }
}
public class Person
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
public string Name { get; set; }
[ForeignKey(typeof(Passport))]
public string PassportId { get; set; }
[OneToOne]
public Passport Passport { get; set; }
}
- Try to create these 2 tables and I always get this error
Additional information: Don't know about App1.Passport
If there is a handler for this exception, the program may be safely continued.
I don't know if I missed something. So please help me solve this problem. Thank you
Comments (6)
-
-
reporter When I install SQLite-Net Extensions by Nuget manager console, it automatically installs SQLite-Net PCL and Newtonsoft.Json. So I think the version is right??
-
How are you creating the
SQLiteNetConnection
? -
reporter I try to add SQLite-Net Extensions source code to my project and remove exist .dll. After rebuild, It works!!!
I don't know why I install from Nuget, I get error but now it's fine. Thank you for you support :)
-
reporter - changed status to closed
Problem is solved
-
Glad it helped.
- Log in to comment
SQLite-Net Extensions found in the NuGet manager requires SQLite-Net PCL (https://www.nuget.org/packages/SQLite.Net-PCL/). If you use a different version, you have to copy the SQLite-Net Extensions source code to your project to link it against your SQLite-Net library version.
Hope it helps.