项目安装程序无法在另一台机器上打开数据库。我的项目在 c# windows 应用程序中,带有 sqlite 数据库连接

Setup of the project was unable to open database on another machine. my project is in c# windows application with sqlite database connection

我已经在我的项目中插入了 app.config 文件。 请帮我解决这个问题。

<?xml version="1.0"?>
<configuration>
  <configSections>
  </configSections>
  <connectionStrings>
    <add name="RConnString" connectionString="Data Source=C:\Users\user\Documents\Visual Studio 2010\Projects\Pathology lab\Pathology lab\bin\Debug\Pathology.sqlite"
      providerName="System.Data.Sqlite" />
    <add name="Pathology_lab.Properties.Settings.PathologyConnectionString"
      connectionString="data source=&quot;C:\Users\user\Documents\Visual Studio 2010\Projects\Pathology lab\Pathology lab\bin\Debug\Pathology.sqlite;"
      providerName="System.Data.SQLite" />
    <add name="screen_shot.Properties.Settings.PathorecordConnectionString"
      connectionString="data source=&quot;C:\Users\user\Desktop\screen shot\screen shot\bin\Debug\Pathorecord.db&quot;"
      providerName="System.Data.SQLite" />
  </connectionStrings>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
</configuration> 

尝试在 |DataDirectory|/Databasename.db 中写入连接字符串 并调用App.domain()方法

尝试使用这个连接字符串