Hi team,

My dev box is:

1.       Windows 8.1, 64 bit

2.       Visual Studio 2013 with update 4



I've got a problem like this:

I have a VS2010 project from one of my friends. The project contains a
sqlite3 database file containing some tables and some views. According to my
friend, the database file is working properly with Visual Studio 2010 at
that time. Also I can see the edmx file and generated code files from the
VS2010 project. And I also find out it still uses provider
System.Data.Sqlite instead of System.Data.Sqlite.EF6. And when I open the
project with Visual studio 2013 and compile it, it has a failure saying 'the
provider System.Data.Sqlite has not been registered in app.config or
machine.config'. To fix this, first I complete the following installations

1.       sqlite-netFx451-setup-bundle-x86-2013-1.0.96.0.exe is installed
along with the Entity framework 6 tools for vs2012
<https://www.microsoft.com/en-us/download/details.aspx?id=40762> &2013

2.       Nuget package System.Data.Sqlite is installed to the latest version
1.0.96.0 and entity framework version is 6.1.2

Then open the edmx file with Xml editor and manually change the
'System.Data.Sqlite' to 'System.Data.Sqlite.EF6' and then compile it, the
error message changes to be like 'Object not reference an instance'. After
that I try another way, delete the existed edmx file (starting from
scratch). When I use 'New ADO.Net Entity Model' wizard of VS2013 to create a
model in a new console project, everything appears fine, but actually not.
One of the view I need heavily is not auto-generated with the below warning
message



warning 6013: The table/view 'main.xxx does not have a primary key defined
and no valid primary key could be inferred. This table/view has been
excluded. To use the entity, you will need to review your schema, add the
correct keys, and uncomment it.



I am sort of blocking now. Any ideas about what's going on here and how to
fix that.



Best Wishes,

Jingfei

Reply via email to