I'm using the SQL Server Compact/SQLite Toolbox for Visual Studio by ErikEJ. Environment is Windows 7 x64 with Visual Studio 2013.5
I'm following along in the example on the blog http://erikej.blogspot.dk/2013/11/entity-framework-6-sql-server-compact-4_25.html but when I get to
" ... connect to the database file in your project folder:",
I right click to "Add SQL Server Compact/SQLite Connection" and the box comes up, but at the bottom is in red
"Cannot save this connection for use with EF6 Tools, make sure the SQL Server Compact DbProvider is installed, and possibly restart Visual Studio"
I go back and click on the About button and get
SQL Server Compact 4.0 in GAC - Yes - 4.0.8482.1
SQL Server Conpact 4.0 DbProvider - No
SQL Server Compact 4.0 DDEX provider - No
SQL Server Compact 4.0 Simple DDEX provider - Yes
SQL Server Compact 4.0 Engine Test: PASS!
I've uninstalled SQL Server Compact and the SQL Server Compact Toolbox and reinstalled both but I still have the same error.
I'm wondering how do I get SQL Server Compact 4.0 DbProvider to be yes?
Thanks
Edit I've added the details of the relevant part of machine.config that could contain invalid entries.
<system.data>
<DbProviderFactories>
<add name="Odbc Data Provider" invariant="System.Data.Odbc" description=".Net Framework Data Provider for Odbc" type="System.Data.Odbc.OdbcFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add name="OleDb Data Provider" invariant="System.Data.OleDb" description=".Net Framework Data Provider for OleDb" type="System.Data.OleDb.OleDbFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add name="OracleClient Data Provider" invariant="System.Data.OracleClient" description=".Net Framework Data Provider for Oracle" type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add name="SqlClient Data Provider" invariant="System.Data.SqlClient" description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/></DbProviderFactories>
</system.data>
I've checked the above against an example here https://developer.teradata.com/blog/netfx/2010/12/dbproviderfactories-demystified and I can't see anything obviously wrong with that part.
Aha. I was looking in the wrong place. Under C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config I have
<system.data>
<DbProviderFactories><add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/></DbProviderFactories>
</system.data>
hmmm ... the other ones are missing.