Create table in Windows phone 8.1 and get error

Issue #43 closed
quang aqp created an issue

Hi guys,

I've just followed these steps to install SQLlite on Visual Studio 2013:

  1. Install this extension (https://visualstudiogallery.msdn.microsoft.com/5d97faf6-39e3-4048-a0bc-adde2af75d1b?SRC=VSIDE) for visual Studio and add the reference after that.

  2. Change build platform to x86

  3. Install sqlite-net by Nuget Manager

  4. Install SQLite.Net Extensions by Nuget Manager

  5. 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; }
}
  1. 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)

  1. quang aqp 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??

  2. quang aqp 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 :)

  3. Log in to comment