I upgraded my ASP.NET Core application from .NET Core 2.0 to .NET Core 2.1. I can run the solution in my localhost but when I deploy it to another server there is an exception (shown below).
The steps I have done to solve the issue so far are below and it throws the same error.
Does anybody have any suggestion how to solve this issue?
Steps I've done:
Modify the setting for the project
netcoreapp2.1 AnyCPU;x64 2.1.0 true true I also added binding redirect in the web.config
Install .NET Core 2.1 on the server
I also deleted my .vs folder and restarted Visual Studio.
Exception:
Microsoft.AspNetCore.Mvc.Razor.Compilation.CompilationFailedException: One or more compilation failures occurred:error CS1705: Assembly Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'System.Runtime' with identity 'System.Runtime, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'