【问题标题】:Can't find an assembly matching the version that isn't set in config tells it a different version which exists找不到与配置中未设置的版本匹配的程序集告诉它存在不同的版本
【发布时间】:2018-11-06 10:18:48
【问题描述】:

我得到的错误是:

Can't load file or assembly System.Web.Http 5.2.3.0

即使在我的 web.config 文件中它说

<dependentAssembly>
        <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.6.0" newVersion="5.2.6.0" />
      </dependentAssembly>

我检查了 bin 文件夹中的 dll,它的版本是 5.2.6.0,那么它从哪里获得 5.2.3.0?

【问题讨论】:

标签: c# nuget


【解决方案1】:

请尝试卸载和安装包参考。

另外,请检查您是否在加载到项目构建周期的任何项目中使用 System.Web.Http 引用。如果有请检查参考部分中的版本并根据需要更改参考。

问题很可能与上述原因有关,因为我在解决方案中的自定义参考中遇到了类似的问题。请尝试告诉我。

【讨论】:

    猜你喜欢
    • 2018-11-25
    • 1970-01-01
    • 2013-02-22
    • 1970-01-01
    • 1970-01-01
    • 2017-08-03
    • 2011-07-20
    • 2014-05-15
    • 2013-06-18
    相关资源
    最近更新 更多