bubibubi / JetEntityFrameworkProvider

Microsoft Access (Jet) Entity Framework provider
89 stars 26 forks source link

Cannot configure DbFirst #11

Closed davidda closed 6 years ago

davidda commented 6 years ago

I followed the steps in your walkthrough for configuring DbFirst.

The dll is registered in GAC: image

The file C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Config\machine.config shows this:

    <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"/>
        <add name="JetEntityFrameworkProvider" invariant="JetEntityFrameworkProvider" description="JetEntityFrameworkProvider" type="JetEntityFrameworkProvider.JetProviderFactory, JetEntityFrameworkProvider, Version=1.2.10.0, Culture=neutral, PublicKeyToken=756cf6beb8fe7b41" />
    </DbProviderFactories>
    </system.data>

Then, I created a new project and added EF 6.1.3 via NuGet. Finally, I opened the new item dialog and chose "ADO.NET Entity Data Model" and then "Code First from Database".

However, the dialog does not show the entry: image

I've tried with VS 2015 (registry 14.0_Config) and VS 2012 (registry 12.0_Config) and even VS 2017. I've also tried on another computer with VS 2015. For the latter I've attached the registry items DataProviders and DataSources: HKEY_CURRENT_USER-SOFTWARE-Microsoft-VisualStudio-14.0_Config-DataProviders.reg.txt HKEY_CURRENT_USER-SOFTWARE-Microsoft-VisualStudio-14.0_Config-DataSources.reg.txt

bubibubi commented 6 years ago

In your case is missing the DDEX provider. Probably something wrong with the registry.

DataProviders.reg.txt DataSources.reg.txt

davidda commented 6 years ago

I don't see anything wrong. The content of the reg files you posted is contained basically identical in the reg files I posted. I'm on Windows 10, latest version. Not sure if that could make a difference.

bubibubi commented 6 years ago

Same OS here. Try compile everything using x86 (VS runs in x86).

bubibubi commented 6 years ago

I'm thinking about your issue. Did you install the provider also from github? To see of the provider is in the gac you can also try to check it writing some lines of code using dbproviderfactories. In this days I'll also do it.

davidda commented 6 years ago

Okay I figured it out. To make the provider show up in the list:

It is not nessecary to compile the provider in x86.