Comments (44)
@Yabbie442 You can track progress here: dotnet/ef6#535 - not in 15.7.2 for sure
from efcorepowertools.
Did you follow the wiki guide?
from efcorepowertools.
From @Yabbie442 on May 11, 2018 3:18
Did we ever get an answer to this? I'm having the exact same problem and it's driving me nuts!
The weird thing is, I got the edmx file to generate once (a while ago), but now, when I do a 'refresh from database', I get the above exception.
Would REALLY, really, really appreciate any help you can provide Erik!
from efcorepowertools.
From @Yabbie442 on May 11, 2018 3:38
As you can see, the GAC is all good. The only thing that stands out to me is the System.Data.SQLite DDEX provider. Please forgive me, as I'm new to this (student level developer). I really need this to work.
I'm using VS 2017 Community, .NET 4.6.2, EF 6.2.0.
I have followed the steps in your wiki, I have the latest toolbox installed.
from efcorepowertools.
From @Yabbie442 on May 11, 2018 3:45
packages.config:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.2.0" targetFramework="net462" />
<package id="System.Data.SQLite" version="1.0.108.0" targetFramework="net462" />
<package id="System.Data.SQLite.Core" version="1.0.108.0" targetFramework="net462" />
<package id="System.Data.SQLite.EF6" version="1.0.108.0" targetFramework="net462" />
<package id="System.Data.SQLite.Linq" version="1.0.108.0" targetFramework="net462" />
</packages>
from efcorepowertools.
From @Yabbie442 on May 11, 2018 3:48
App.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v13.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite.EF6" />
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
<remove invariant="System.Data.SQLite" />
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
</DbProviderFactories>
</system.data>
</configuration>
from efcorepowertools.
From @Yabbie442 on May 11, 2018 3:50
I can see the SQLite DB in my SQLite/SQL Server Compact Toolbox.
from efcorepowertools.
From @Yabbie442 on May 11, 2018 3:53
Now, this is where my problems start:
I add a ADO.NET Entity Data Model. In the Wizard, I can see the SQLiteDB. I can include the database objects I want in my model.
It's when I finally come to click 'Finish', I get this:
And this in the output:
Unable to generate the model because of the following exception: 'System.NotSupportedException: Unable to determine the provider name for provider factory of type 'System.Data.SQLite.SQLiteFactory'. Make sure that the ADO.NET provider is installed or registered in the application config.
at System.Data.Entity.Utilities.DbProviderFactoryExtensions.GetProviderInvariantName(DbProviderFactory factory)
at System.Data.Entity.Infrastructure.DependencyResolution.DefaultInvariantNameResolver.GetService(Type type, Object key)
at System.Data.Entity.Infrastructure.DependencyResolution.CachingDependencyResolver.<>c__DisplayClass1.<GetService>b__0(Tuple`2 k)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at System.Data.Entity.Infrastructure.DependencyResolution.CachingDependencyResolver.GetService(Type type, Object key)
at System.Data.Entity.Infrastructure.DependencyResolution.ResolverChain.<>c__DisplayClass3.<GetService>b__0(IDbDependencyResolver r)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at System.Data.Entity.Infrastructure.DependencyResolution.ResolverChain.GetService(Type type, Object key)
at System.Data.Entity.Infrastructure.DependencyResolution.RootDependencyResolver.GetService(Type type, Object key)
at System.Data.Entity.Infrastructure.DependencyResolution.ResolverChain.<>c__DisplayClass3.<GetService>b__0(IDbDependencyResolver r)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at System.Data.Entity.Infrastructure.DependencyResolution.ResolverChain.GetService(Type type, Object key)
at System.Data.Entity.Infrastructure.DependencyResolution.CompositeResolver`2.GetService(Type type, Object key)
at System.Data.Entity.Infrastructure.DependencyResolution.DbDependencyResolverExtensions.GetService[T](IDbDependencyResolver resolver, Object key)
at System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderInvariantName(DbConnection connection)
at Microsoft.Data.Entity.Design.VersioningFacade.ReverseEngineerDb.SchemaDiscovery.EntityStoreSchemaGeneratorDatabaseSchemaLoader..ctor(EntityConnection entityConnection, Version storeSchemaModelVersion)
at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelGenerator.CreateDbSchemaLoader(EntityConnection connection, Version storeSchemaModelVersion)
at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelGenerator.GetStoreSchemaDetails(StoreSchemaConnectionFactory connectionFactory)
at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelGenerator.CreateStoreModel()
at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelGenerator.GenerateModel(List`1 errors)
at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderEngine.GenerateModels(String storeModelNamespace, ModelBuilderSettings settings, List`1 errors)
at Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Engine.ModelBuilderEngine.GenerateModel(ModelBuilderSettings settings, IVsUtils vsUtils, ModelBuilderEngineHostContext hostContext)'.
Loading metadata from the database took 00:00:02.0447356.
Generating the model took 00:00:18.9723483.
from efcorepowertools.
From @Yabbie442 on May 11, 2018 3:54
Please dear God if you can help, I'd really appreciate it! I'm going insane!
from efcorepowertools.
From @Yabbie442 on May 11, 2018 4:26
from efcorepowertools.
From @sheitmann on May 11, 2018 5:14
@ErikEJ
yes I followed the guide
everything worked so far except the finish of the wizard.
I see that the connection string contains the EF6 provider but the wizard seems to try to find the provider for System.Data.SQLite.SQLiteFactory.
Even if I add System.Data.SQLite.SQLiteFactory to my config it doesn't work.
it is exactly the same issue Yabbie442 has
from efcorepowertools.
From @Yabbie442 on May 11, 2018 5:19
Hi @sheitmann .
Is there anything in my above posts that is different between me and you? I figure the more information we can provide, the easier it will be for @ErikEJ to identify what we are doing wrong (or possibly fix an issue).
The VS2017 15.7.1 update is fairly new. I wonder if that is a factor at all?
It's good (in a way) to see someone else has the same problem as me. At least it's not just me doing something completely stupid! :)
from efcorepowertools.
Wonder if it is related to VS 2017.7 ?
I andre case, Please provide a reproduction project and detailed repro steps, thanks
from efcorepowertools.
From @sheitmann on May 11, 2018 5:44
@Yabbie442
everything looks same
@ErikEJ
have to leave to work now. I can build a repo project later.
it was really a new blank project and your guide followed.
from efcorepowertools.
From @Yabbie442 on May 11, 2018 5:45
@ErikEJ as above, I had a new project and followed the steps in the wiki. I'll try and get a project together now.
from efcorepowertools.
I will try to repro, not on 15.7 yet, and then update to 15.7
Get Outlook for Androidhttps://aka.ms/ghei36
From: Yabbie442 [email protected]
Sent: Friday, May 11, 2018 7:45:35 AM
To: ErikEJ/SqlCeToolbox
Cc: Erik Ejlskov Jensen; Mention
Subject: Re: [ErikEJ/SqlCeToolbox] Can't finnish ADO.NET Entity Data Model wizard SQlite EF6 VS 2017 (#710)
@ErikEJhttps://github.com/ErikEJ as above, I had a new project and followed the steps in the wiki. I'll try and get a project together now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubErikEJ/SqlCeToolbox#710 (comment), or mute the threadhttps://github.com/notifications/unsubscribe-auth/AD-d433XowNWDLxhoe8X4TysRxFZn5kEks5txSV_gaJpZM4T6TK-.
from efcorepowertools.
From @Yabbie442 on May 11, 2018 6:0
Steps to reproduce:
- Install Toolbox.
- Install SQLite (sqlite-netFx46-setup-bundle-x86-2015-1.0.108.0.exe).
- Create a new solution in VS. (I created a WinForms project).
- Add Entity Framework to project (NuGet) version 6.2.0.
- Add System.Data.SQLite to project (NuGet) version 1.0.108.
- Add new item to project (Visual C# Items --> Data --> ADO.NET Entity Data Model).
- Select existing SQLite database. Click 'Next'.
- Select 'Tables' on 'Which database object do you want to include in your model'.
- Click 'Finish'.
*** Exception displayed (the one in the white box in earlier post).
Can't finish the model.
Project attached, after a clean.
Hope this helps!!
from efcorepowertools.
I am unable to repro with 15.6 - I think it may be caused by the fact that the EF 6.2 tooling is finally available in 15.7 - I have logged an issue here: dotnet/ef6#535
from efcorepowertools.
I am able to repro with 15.8 preview 1 - so it is a EF Tooling / VS Issue
from efcorepowertools.
From @sheitmann on May 11, 2018 9:30
Great. Let's hope for a fix :)
So a workaround would be to uninstall 15.7 and use 15.6.
from efcorepowertools.
Yes, I would imagine so - please update the thread with your findings
from efcorepowertools.
From @divega on May 11, 2018 21:41
This is what I believe is happening:
- We added an improvement that workarounds a performance regression that affected reverse engineering for SQL Server databases. As part of identifying the SQL Server provider, we query provider factory registrations to find the name of the current one and match it against "System.Data.SqlClient".
- Since in the repro the SQLite provider registration happens in the application's config file, the designer code running inside the Visual Studio process cannot find the right provider invariant name and fails.
- If this reasoning is correct, a possible workaround is to put the registration of the provider in machine.config or in devenv.exe.config.
- We are planning to fix this in the next opportunity we have to update the designer, either in 15.7 servicing or in 15.8. The fix will likely be to ignore the exception. Since SqlClient (or a wrapper provider that is impersonating SqlClient) is normally always registered globally, we can assume that any time the invariant name lookup fails, it is because it is not SqlClient.
from efcorepowertools.
I have described the workaround using 15.7 on the WIKI page here: https://github.com/ErikEJ/SqlCeToolbox/wiki/EF6-workflow-with-SQLite-DDEX-provider
from efcorepowertools.
From @Yabbie442 on May 13, 2018 9:46
Thank you for your continued work and support @ErikEJ. I'll confirm the work around on 15.7.1 at work tomorrow (although I'm sure it will be fine).
When the issue is fixed "properly" in VS, will I need to remove the workaround from the machine.conf?
from efcorepowertools.
From @Yabbie442 on May 13, 2018 23:37
Good morning! @ErikEJ your workaround works for me with VS 15.7.1. Thank you so much.
Kind regards.
from efcorepowertools.
From @Yabbie442 on May 14, 2018 7:2
Spoke to soon. Now I get the error at runtime, rather than in the designer....
from efcorepowertools.
From @Yabbie442 on May 15, 2018 0:38
I resolved the above problem by adding:
<provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
To my App.config
I don't know if there are any other ramifications to doing this, but it all seems good so far.....
from efcorepowertools.
@Yabbie442 Thanks. I have mentioned your "fix" on the wiki page
from efcorepowertools.
From @Yabbie442 on May 15, 2018 23:36
Hi @ErikEJ , happy to provide the 'fix', but if you have the chance, please try and reproduce the issue I described above - I'm only a "beginner" when it comes to developing, so I don't know if there are any other consequences of my "fix". Thank you again for all your work.
from efcorepowertools.
From @Yabbie442 on May 15, 2018 23:37
Hi @ErikEJ . When VS 15.7.2 or 15.8 is released, will we need to remove/change the workarounds we have put in to get things working now?
from efcorepowertools.
When VS 15.7.2 or 15.8 is released, will we need to remove/change the workarounds we have put in to get things working now?
I would remove any manual changes to machine.config at that point
from efcorepowertools.
VS 15.7.2 has been released. @ErikEJ do you know if this issue has been fixed? I tried looking at the release notes, but I couldn't find them. If it has been fixed, is removing the 'fix' from machine.config the only change we need to make? Many thanks for your help.
from efcorepowertools.
Closing as external issue
from efcorepowertools.
The proposed workarounds do not seem to work in VS 15.7.2.
Tried both the machine.config and app.config separately and combined.
Even uninstalled and reinstalled SQLite in GAC. Tried an new project.
Nothing seems to work.
Any advice or suggestion is most welcome (even confirmation that it isn't just me...).
from efcorepowertools.
i am facing same issue as Tom-Coding
The workarounds do not work in VS 15.7.2. Even tried machine.config and app.config
from efcorepowertools.
I am not in a position to fix this, it requires an update to the EF 6.2 Tooling as mentioned earlier, please post your concerns here: dotnet/ef6#535
from efcorepowertools.
Reopen to keep visible
from efcorepowertools.
This issue is fixed in VS 15.8 ? I am getting error as
NotSupportedException: Unable to determine the provider name for provider factory of type 'System.Data.SqlClient.SqlClientFactory'. Make sure that the ADO.NET provider is installed or registered in the application config.
from efcorepowertools.
@maddy027 This issue relates to SQLite, not SQL Server
from efcorepowertools.
Hello @ErikEJ, So the VS 15.8 still does not support EF for SQLite today, am I rigth?
from efcorepowertools.
@dalabe No, you are not, the issue EF6 Tools / SQLite issue is fixed in 15.8
from efcorepowertools.
hello @ErikEJ , I'm still got this exception :
System.NotSupportedException: 'Unable to determine the provider name for provider factory of type 'System.Data.SQLite.SQLiteFactory'. Make sure that the ADO.NET provider is installed or registered in the application config.'
I use VS2017 v 15.9.4
please help
Regards,
from efcorepowertools.
@abrahamdev22 I can only refer you to the wiki post
from efcorepowertools.
With the latest daily build, you can avoid installing the provider!
from efcorepowertools.
Related Issues (20)
- Ef Power tools not appearing on the Context Menu HOT 2
- Smoother Typing/Search on the "Choose Your Database Objects" Panel HOT 2
- Reverse Engineering causes System.IO.FileNotFound exception HOT 3
- Permits break execution HOT 7
- problem to install EF Core Power Tools on Visual Studio 2019 HOT 3
- SQL Table Function primary key issue HOT 10
- Reverse engineering doesn't pick up key HOT 3
- Version 2.5.908 of EFCorePowerTools.vsix needed HOT 1
- Limitation of sp_describe_first_result_set... HOT 3
- Scaffolding Reverse Engineering HOT 8
- Link to Download EF Power Tools Package 2.5.1236 or a version that supports .Net Core 3.1 HOT 1
- Update of EFCorePowerTools Update fails HOT 10
- Emit System.CodeDom.Compiler.GeneratedCodeAttribute on generated classes HOT 11
- DatabaseFacade - SqlQueryRaw not found HOT 7
- Any way to set a default value for a property? (Question, not a bug) HOT 1
- How do you use spatial types when scaffolding using the NuGet package? HOT 3
- Reverse engineering is stuck in a loop that crashes visual studio 2022 Version 17.10.4. HOT 4
- Migrations context-menu is missing HOT 2
- UseDateOnlyTimeOnly = false seems to not be respected in case of TimeSpan HOT 6
- [Feature] Reverse Engineering with configurable OutputDirectories HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from efcorepowertools.