【问题标题】:Unable to install or run the application - System.Windows.Interactivity Version 4.0.0.0无法安装或运行应用程序 - System.Windows.Interactivity 版本 4.0.0.0
【发布时间】:2013-12-22 19:20:31
【问题描述】:

我完全被卡住了。搜索和搜索。 我参考了 System.Windows.Interactivity 版本 4.5.0.0 当我通过ClickOnce释放系统时,系统没有安装并报如下错误。

无法安装或运行应用程序。该应用程序需要 该程序集 System.Windows.Interactivity 版本 4.0.0.0 是 首先安装在全局程序集缓存 (GAC) 中。

我正在使用 DevExpress 工具和 MVVMLight。如果我尝试添加 4.0.0.0 版本,我会收到错误,因为需要 4.5。任何帮助将不胜感激。谢谢斯科特

【问题讨论】:

  • 我发现它是 DevExpress 的参考。我已在他们的网站上发布并等待回复。

标签: c# wpf devexpress clickonce mvvm-light


【解决方案1】:

当您发布应用程序时 - 您的输出中可能包含以下内容: 无法解决“System.Windows.Interactivity, Version=4.5.0.0, ....”之间的冲突。

您需要做的是在 app.config 中添加重新映射 就像在这里完成What should I change when the compiler tells me to "Consider app.config remapping" when I have no app.config file?

【讨论】:

    【解决方案2】:

    考虑像这样在 app.config 中重新映射它:

       <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="System.Windows.Interactivity" publicKeyToken="31bf3856ad364e35"
                              culture="neutral"/>
            <bindingRedirect oldVersion="4.0.0.0" newVersion="4.5.0.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    

    【讨论】:

      【解决方案3】:

      我遇到了同样的错误,但还有一个问题,我可以通过检查以下列表来解决它

      • 项目 -> 属性 -> 应用程序 -> 目标框架
      • 检查System.Windows.Interactivity 的目标框架
      • 检查Microsoft.Expression.Interactions 的目标框架

      【讨论】:

        【解决方案4】:

        在包管理器控制台中,运行:Install-Package Expression.Blend.Sdk

        这是Expression.Blend.Sdk 包,其中包含 System.Windows.Interactivity 的 4.0 和 4.5 版本

        【讨论】:

          猜你喜欢
          • 2023-02-07
          • 2021-11-29
          • 2017-07-21
          • 1970-01-01
          • 2018-03-15
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多