编程语言
首页 > 编程语言> > c# – 使用ClickOnce安装我的应用程序 – 缺少dll消息(虽然没有请求)

c# – 使用ClickOnce安装我的应用程序 – 缺少dll消息(虽然没有请求)

作者:互联网

我已经完成了clickOnce安装程序.这似乎没问题,但我有一点问题.

我已经设置为sql server 2008 express的先决条件.

如果我将其更改为2012,它会正确安装必备组件,但是,当它开始安装我的应用程序时,它会出错,搜索Microsoft.SqlServer.management.dmf 10.0.0.0版.

奇怪的是,读取this link,sql server 2008需要版本10(而2012年要求版本11).

那么,它为什么要求版本10?我在空白虚拟机上尝试它,所以我确定没有安装任何东西.

我还阅读了this,其中回答者说要进入项目属性>发布>应用程序文件并删除一些库(我已删除了microsoft.sqlServer库).我做到了,但没有!它仍然要求Microsoft.SqlServer.management.dmf.它与共享管理对象一起安装在系统中,但为什么要求sql server 2008的版本?

至少如何能够发现谁需要它?

下面是我在“发布”部分中的应用程序文件.如您所见,我已经排除了一些库.之前,他们被设定为先决条件.

解决方法:

解决了这个映射

  <runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.SqlServer.ConnectionInfo" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
      <bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0" />
    </dependentAssembly>
        <dependentAssembly>
      <assemblyIdentity name="Microsoft.SqlServer.Diagnostics.STrace" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
      <bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0" />
    </dependentAssembly>
        <dependentAssembly>
      <assemblyIdentity name="Microsoft.SqlServer.SqlEnum" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
      <bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0" />
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.SqlServer.Dmf" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
      <bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0" />
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.SqlServer.SqlClrProvider" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
      <bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0" />
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.SqlServer.Management.SmoMetadataProvider" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
      <bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0" />
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.SqlServer.Management.Sdk.Sfc" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
      <bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0" />
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.SqlServer.Smo" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
      <bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0" />
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.SqlServer.Management.SqlParser" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
      <bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0" />
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.SqlServer.ServiceBrokerEnum" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
      <bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0" />
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
      <bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0" />
    </dependentAssembly>
  </assemblyBinding>
</runtime>

标签:c,net,sql-server,wpf,clickonce
来源: https://codeday.me/bug/20190623/1275560.html