【问题标题】:Manifest definition issue deploying Hangfire .net Core 2.1 MVC app部署 Hangfire .net Core 2.1 MVC 应用程序的清单定义问题
【发布时间】:2019-05-23 17:46:41
【问题描述】:

我正在尝试部署 Hangfire ASP.net Core 2.1 MVC Hangfire 应用程序。

它可以在本地工作,但是当我部署它时出现此错误:

An error occurred while starting the application.
FileLoadException: Could not load file or assembly 'Hangfire.SqlServer, Version=1.6.21.0, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

我可以托管其他 .net Core 2.1 MVC 网站。

通常在过去 - 在不同的非 Hangfire 应用程序中 - 如果我的解决方案中有 NuGet 包不匹配,则会出现清单定义错误,但这是解决方案中唯一使用 Hangfire 的项目。

我已经尝试删除 hangfire 数据库,重新创建它,重新启动服务器 - 没有任何帮助。

我在 Google 上也找不到有关此特定错误的任何信息。我错过了什么?

在非核心站点中,将向 Web.Config 添加一些内容来解决此问题 - 在 .net Core 中如何完成?对旧版本软件包的引用来自哪里?

【问题讨论】:

    标签: c# asp.net-core-mvc hangfire


    【解决方案1】:

    可以通过将 app.config 文件放在根目录中并在其中添加重定向来将绑定重定向添加到 asp.net 核心应用程序。

    更多详情请参考此链接:

    http://blog.rytmis.net/2016/03/29/asp-net-core-and-assembly-binding-redirects/

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-06-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多