Exception thrown at GlobalConfiguration.Configure(WebApiConfig.Register); within Global.asax.cs which is:

"An exception of type 'System.TypeInitializationException' occurred in mscorlib.dll but was not handled in user code

Additional information:

The type initializer for 'System.Net.Http.Formatting.MediaTypeConstants' threw an exception."

The inner exception is:

{"Method not found: 'System.String System.String.Format(System.IFormatProvider, System.String, System.Object)'."}

I've reinstalled NuGet packages and references. Deleted contents of the bin folder. Cleaned and re-complied. Still no joy and always hits here. It doesn't reach inside of WebApiConfig.Register. Any ideas?

Related posts

Recent Viewed