ErikEJ / SqlCeToolbox

SQLite & SQL Server Compact Toolbox extension for Visual Studio, SSMS (and stand alone)
Other
843 stars 175 forks source link

SQLite Provider is unavailable #887

Closed ElGauchooooo closed 3 years ago

ElGauchooooo commented 3 years ago

I've installed the "SQLite Toolbox DDEX provider" for EF6 as described here https://github.com/ErikEJ/SqlCeToolbox/wiki/EF6-workflow-with-SQLite-DDEX-provider

Unfortunatelly, the SQLite Provider does not show up in the "Choose Data Source" dialog:

image

I've checked the about dialog of the SQLite toolbox, which shows that i've installed Version 4.7.689.0 (which should, according to the release notes, support SQLite 1.1.113. Yet it shows me, that the included SQLite ADO.NET Provider is 1.1.109 and therefore most probably won't show up in the "Choose Data Source" dialog

image

Steps to reproduce

I've followed the steps here: https://github.com/ErikEJ/SqlCeToolbox/wiki/EF6-workflow-with-SQLite-DDEX-provider I've aswell uninstalled both the extension and SQLite and reinstalled afterwards, the issue seems to persist.

Further technical details

Toolbox/Power Tools version: 4.7.689.0

Database engine: SQLite 1.1.113

Visual Studio or SSMS version: VS 2019 Pro 16.8.1

If theres anything else you might need to resolve this, please let me know. Thanks in advance!

ErikEJ commented 3 years ago

Maybe try to install .109?

ElGauchooooo commented 3 years ago

That might work, but how to get 113 up and running?

ErikEJ commented 3 years ago

Use the latest daily build?

ElGauchooooo commented 3 years ago

I did try that aswell, yet with no success. i've taken the instructions from here: https://github.com/ErikEJ/SqlCeToolbox/wiki/Subscribing-to-latest-%22daily%22-build

ErikEJ commented 3 years ago

You can just download...

ErikEJ commented 3 years ago

yet with no success.

What does that mean exactly? you were unable to update or?

I will consider a new official release with support for .113

ElGauchooooo commented 3 years ago

Hi Erik, thanks for the reply and sorry for my late answer. I was able to update, but as you can see on the screenshot, SqlCeToolbox still reports

SQLite ADO.NET Provider included: 1.0.109.0

shouldn't that be:

1.0.113.0 ?

I've just upgraded SqlCeToolbox to version 4.7.690.0, yet it still shows up as SQLite ADO.NET Provider included: 1.0.109.0

Any ideas?

ErikEJ commented 3 years ago

It is because I am apparently loading the dll from GAC 🙁

FerdieGithub commented 3 years ago

I am having a similar issue...

Using:

image

The MS SQL Compact provider appears, but not the SQLite provider, even though I can see them both in the machine.config... image

I tried all sorts of reinstallation, installation of different versions, following the exact steps as per the tutorials here on the wiki... but I just cannot get the SQLite provider to come up...

I would really appreciate any assistance.

ErikEJ commented 3 years ago

I noticed that version 109 was loaded from here !!:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\PrivateAssemblies\System.Data.SQLite.dll

Maybe that is what is causing conflicts.

I tried to rename the file, and the .dll distributed by SQLite Toolbox was loaded instead (as it should be)

ErikEJ commented 3 years ago

@FerdieGithub If you are using .113, you should be using the latest daily build, .112 is supported by the current release on MarketPlace.

ErikEJ commented 3 years ago

I have released 4.7.691 with support for .113

ElGauchooooo commented 3 years ago

Hi Erik,

Thanks a lot for your reply and the fast fix. I found the same issue this night when i was recompiling your extension with some logging, after i realized that it already showed up with version .109 on a fresh VS2019 install without ever SQLite being installed on that machine. My assembly was being loaded VS 2019 Professionals private assemblies folder aswell, it comes preinstalled with Visual Studio. I now can see that it loads the correct .113 Version:

image

Yet i still have no SQLite Data Provider:

image

Any ideas what is now still missing?

ErikEJ commented 3 years ago

@ElGauchooooo I assume you have missed some step in the provider/GAC install guide. The DDEX provider only appears if System.Dats.Sqlite is properly installed in GAC. So follow the install guide exact, and check your x86 machine.config or inspect the GAC.

ElGauchooooo commented 3 years ago

Hi Erik, thanks for the reply. I assumed i did this, but checked once more:

SQLite is installed in GAC:

> gacutil.exe -l System.Data.SQLite
Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.0
Copyright (c) Microsoft Corporation.  All rights reserved.

The Global Assembly Cache contains the following assemblies:
  System.Data.SQLite, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86

Number of items = 1

The only SQLite related entry in my C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.cfg looks like:

<system.data>
        <DbProviderFactories>
            <add name="SQLite Data Provider" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" />
        </DbProviderFactories>
    </system.data>

I'll try to debug your extension , where it tries to load the SQLite ddex.

ErikEJ commented 3 years ago

@ElGauchooooo Make sure you are running the latest daily build!

ElGauchooooo commented 3 years ago

@ErikEJ i did install 4.7.691, but the DDEX Provider still does not appear:

image

ElGauchooooo commented 3 years ago

@FerdieGithub Were you able to get the SQLite Provider showing up with version 4.7.691? I doublechecked everything, yet it does not appear there. SQLite is registered properly in the GAC and it is listed in the machine.config.

ErikEJ commented 3 years ago

@ElGauchooooo Why do you need the SQLite provider?

FerdieGithub commented 3 years ago

Hi Erik

I followed the exact steps as per this article... Not succeeding yet... Where I need to select the SQLite provider it is not in the list....

I need to get a EF6 model generated from the sqlite DB, not sure how else to do this if the SQLite provider does not come up in VS 2019...

image

I did install 1.0.113....

image

I uninstalled and reinstalled the latest daily build from the marketplace...

ErikEJ commented 3 years ago

@FerdieGithub the installation of the System.data.sqlite VS support package is the important part!

ErikEJ commented 3 years ago

Closing this, as in all other instances, following the guide and related tips, and ensuring the same version (in this case .113) is in use everywhere. May be worsened by the fact that VS now includes version .109 sadly.