c# - Deploy Windows Application without installing Sqlite .net provider -
c# - Deploy Windows Application without installing Sqlite .net provider -
i using subsonic 3 sqlite 3 windows application. installing .net provider sqlite (system.data.sqlite) mandatory me while programming application, requirement deploying application is, want create 1 installable , skip portion installing .net provider sqlite on client machine.
i have added references of system.data.sqlite gac(in setup project) won't work because while running application says
system.argumentexception: unable find requested .net framework info provider. may not installed.
i sure there workaround this, shouldn't necessary install .net framework provider sqlite on client machine.
-mmcmedic
in add-on copying db driver .dll application, may need register dbproviderfactory.
normally installer register info provider name in .net machine.config file, ado.net can translate provider name string actual assembly name. can add together straight app.config file instead. don't have sqlite example, have in app.config mysql:
<configuration> ... <system.data> <dbproviderfactories> <clear/> <add name="mysql info provider" invariant="mysql.data.mysqlclient" description=".net framework info provider mysql" type="mysql.data.mysqlclient.mysqlclientfactory, mysql.data" /> </dbproviderfactories> </system.data> ... </configuration> you can right configuration element sqlite out of machine.config on computer has driver installed looking in:
c:\windows\microsoft.net\framework\v2.0.50727\config\machine.config
also note include "clear" element in config above, because if dbproviderfactory had been registered machine.config, throw exception. clear them , re-add ones application needs. can omit "clear" element if positive machines not have db driver installed.
c# deployment sqlite3 subsonic3
Comments
Post a Comment