Need help with Deployment for C# project using SQlight in Visual Studio 2017
Posted: Fri 07 Dec 2018 03:32
I have created a small test program in VS 2017 that simply populates a listbox from SQLite db and allows adding new items to the list. It works fine on the development machine but when I create an installer and then install on another machine, the program runs but when I attempt to get data from the database I get this error “unable to find requested .Net Framework Data Provider”.
I have made sure the db is in c:\db on the target machine. Both machines are Windows 10.
Thanks in advance.
The app.config contentrs are as below.
<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=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
<connectionStrings>
<add name="mainEntities" connectionString="metadata=res://*/db.csdl|res://*/db.ssdl|res://*/db.msl;provider=Devart.Data.SQLite;provider connection string="Data Source=C:\db\Tempsaver2.db3"" providerName="System.Data.EntityClient"/>
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
</entityFramework>
</configuration>
I have made sure the db is in c:\db on the target machine. Both machines are Windows 10.
Thanks in advance.
The app.config contentrs are as below.
<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=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
<connectionStrings>
<add name="mainEntities" connectionString="metadata=res://*/db.csdl|res://*/db.ssdl|res://*/db.msl;provider=Devart.Data.SQLite;provider connection string="Data Source=C:\db\Tempsaver2.db3"" providerName="System.Data.EntityClient"/>
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
</entityFramework>
</configuration>