I have converted my web api framework target from 4.6.2 --> 4.8, this is the error I get after I change target framework and reinstalling nuget packages:-
The type initializer for 'System.Web.Http.GlobalConfiguration' threw an exception.. error ASPRUNTIME.
My web config have information of old library and new as below:-
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
</dependentAssembly>
Can anyone suggest what is problem here. Thanks for help.