I am publishing my .net core application in local machine and deploying to client server. But my application gives below error.
Error:FileLoadException: Could not load file or assembly 'Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I observed that I published my app with Microsoft.AspNetCore.Mvc.Core, Version=2.1.16.0 but client server have Microsoft.AspNetCore.Mvc.Core, Version=2.1.11. So for temporary fix I have replaced my dll into client machine.
But I need permanent fix for this. Please help me how to get Microsoft.AspNetCore.Mvc.Core, Version=2.1.11 version to my system.
You can either do this through Nuget or PM, just search or Nuget on VS, find the package you want to downgrade in the installed section, then on the right hand you can select which version to downgrade to.
User contributions licensed under CC BY-SA 3.0