When I attempt to:
- Add a new
ADO Entity Data Model
- Select
EF Designer from database
- Select an existing database connection, include the connection string, and save it to
app.config
- Do NOT copy/modify the connection (I tried this with the copy and with a database that as already in my project)
I get an error
Your project references the latest version of the Entity Framework; however, an Entity Framework database provider compatible with this version could not be found for your data connection
I've been trying for hours to get this configuration to work without success. I am using the following:
- Windows 7 64-bit
- Visual Studio 2012 Express (C# application)
- SQL Server Compact Edition 4.0 SP1 x64 ENU - I can't install the 32bit version on a 64-bit OS.
- Entity Framework 6.1.0 dated 3/17/2014
EntityFramework.SqlServerCompact
6.1.0
I have tried uninstalling and re-installing components 3-5 multiple times.
I have the following in the app.config
file (omitted the <entityFramework>
section):
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SqlServerCe.4.0" />
<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>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework">
<parameters>
<parameter value="System.Data.SqlServerCe.4.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" />
</providers>
</entityFramework>
</system.data>
I have rebuilt the solution multiple times with no errors. The application starts.
I have rebooted multiple times.
I have confirmed that the project is not referencing System.Data.Entity
.
Please tell me I'm missing something simple.