简体   繁体   English

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

[英]Installing my application with ClickOnce - missing dll message (although not requested)

I have done a clickOnce installer. 我已经完成了clickOnce安装程序。 It seems to be ok, but I have a little problem. 这似乎没问题,但我有一点问题。

I have set as prerequisite sql server 2008 express. 我已经设置为sql server 2008 express的先决条件。

If I change it to 2012, it install the prerequisites correctly, but, when it is starting to install my app, it gives error, searching for Microsoft.SqlServer.management.dmf version 10.0.0.0. 如果我将其更改为2012,它会正确安装必备组件,但是,当它开始安装我的应用程序时,它会出错,搜索Microsoft.SqlServer.management.dmf 10.0.0.0版。

The weird point is that, reading this link , the version 10 is required for sql server 2008 (while 2012 asks for the version 11). 奇怪的是,阅读此链接 ,sql server 2008需要版本10(而2012年要求版本11)。

So, why does it asks for the version 10? 那么,它为什么要求版本10? I'am trying it on blank virtual machine, so I'm sure there aren't any stuff installed. 我在空白虚拟机上尝试它,所以我确定没有安装任何东西。

I have also read this , where the answerer said to go in Project Properties > Publish > Application Files and remove some libs (I have removed the microsoft.sqlServer libs). 我也读过这个 ,回答者说在项目属性>发布>应用程序文件中删除了一些库(我已经删除了microsoft.sqlServer库)。 I have done it, but nothing! 我做到了,但没有! It is still asking for Microsoft.SqlServer.management.dmf. 它仍然要求Microsoft.SqlServer.management.dmf。 It is installed in the system with the shared management object, but why it asks for the version of sql server 2008? 它与共享管理对象一起安装在系统中,但为什么要求sql server 2008的版本?

How can, at least, discover who is needing it? 至少如何能够发现谁需要它?

Below there is my application files in the Publish section. 下面是我在“发布”部分中的应用程序文件。 As you can see, I have excluded some libs. 如您所见,我已经排除了一些库。 Before, they were set as prerequisite. 之前,他们被设定为先决条件。

在此输入图像描述

Solved with this mapping in 解决了这个映射

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

I fixed it by Include Microsoft.SqlServer.* in for Publish Status. 我修复了它包含Microsoft.SqlServer。* in for Publish Status。 project properties> publish > Application Files > Publish Status column select "Include" on all Microsoft.SqlServer.* files. 项目属性>发布>应用程序文件>发布状态列在所有Microsoft.SqlServer。*文件上选择“包含”。 In my case, it works on the next publish version right after this changes. 就我而言,它在更改后立即适用于下一个发布版本。

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM