I'm trying to deploy a Hangfire ASP.net Core 2.1 MVC Hangfire app.
It works locally but when I deploy it I get this error:
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)
I'm hosting other .net Core 2.1 MVC sites fine.
Usually in the past - in different non Hangfire apps - a manifest definition error came if I had a NuGet package mismatch within a solution, but this is the only project in the solution that uses Hangfire.
I've tried deleting the hangfire database, recreating it, rebooting server - nothing helps.
I can't find anything on Google about this specific error either. What am I missing?
In a non Core site something would be added to the Web.Config to fix this - how is this done in .net Core? Where is the reference to the older version of the package coming from?
Binding redirects can be added to an asp.net core application by putting an app.config file in the root directory and adding your redirects there.
Refer this link for more details:
http://blog.rytmis.net/2016/03/29/asp-net-core-and-assembly-binding-redirects/
Hope this helps
User contributions licensed under CC BY-SA 3.0