I have an self hosted application targeting .NET 4.6.1 and project targeting Microsoft.NET.Sdk.Web I have added AspNetCore 2.2.0 package and have all dependencies updated to the latest .NET 4.6.1 compatible packages. When trying to render an CSHTML view from file there is an exception thrown with following error
Assembly 'Microsoft.AspNetCore.Mvc.Razor' with identity 'Microsoft.AspNetCore.Mvc.Razor, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' uses 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'System.Runtime' with identity 'System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
The precompiled views are working just fine. So i am not sure whats going on here, as i understand Microsoft.AspNetCore.Mvc.Razor requires an higher version of System.Runtime?
I have checked the nuget repo and it seems that i am using the latest version so i am not sure where to look from here :(
Any ideas ?