question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.Net 4 does not work.

See original GitHub issue

First 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:closed
  • Created 8 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
johndkanecommented, Mar 28, 2019

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

<connectionStrings>

  <add name="memDb" 
    connectionString="Data Source=:memory:;Version=3;Pooling=True;" 
    providerName="System.Data.SQLite.EF6" />

(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)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found