.Net 4 does not work.
See original GitHub issueFirst of all great project, This is very much needed to SQLite-EF users! As mentioned in other issues when downgrading to .Net 4 the code breaks due to App.config changes. However, using the same App.config from here will not work either. After a few trials and errors I have managed to make it work. Below is the final app.config that worked for me. Can you add steps to overcome this issue in the Readme.md file so that other may use it as well. (I think the only difference is in the connections string)
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="footballDb" connectionString="data source=.\footballDb.sqlite" providerName="System.Data.SQLite.EF6" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
<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" />
</DbProviderFactories>
</system.data>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
<provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
</providers>
</entityFramework>
</configuration>
Thanks, Harel M.
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Net 4.0 will not load
Net framework repair tool to repair the currently installed packages and then enable the framework version 4.0. If the repair tool does not...
Read more >Manual .NET 4.XX install does not work or even start
Here is my suggestion. Run the .NET Framework Cleanup Tool remove everything. You can then install .NET Framework 4.5.2 and see if you...
Read more >Why does my .NET 4 application know .NET 4 is not installed
This is a pretty well kept secret. It will happen when you target .NET 4 and the user runs the app when .NET...
Read more >5 Ways to Repair the .NET Framework on Windows
NET Framework Repair Tool doesn't work, you can disable and re-enable the feature from Optional Features to repair the framework.
Read more >How do I complete a repair on Microsoft .NET Framework ...
Close all running software applications. Go to Windows Start Menu -> Control Panel -> Add or Remove Programs or Program and Features. Select...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In-Memory Database Connection This is an example of the in-memory SQLite v3 database connection string to use. It took me a bit of time to track down
Pooling=True
is needed.In web.config / app.config
…
(added to this issue because the issue is currently being linked to from the Hint section of the project README.md file; developers will likely reference this area for helpful configuration info)
NuGet package: https://github.com/msallin/SQLiteCodeFirst/commit/ef140642822f18cbe8af8f83e7afc7440c08c7c2 Hint about app.config: https://github.com/msallin/SQLiteCodeFirst/commit/f85bcca439a81fbe8505a1c78fd0cb58f838bc6c