Tests in my unit test project which are written for WebApi's are failing.
The Exception that is thrown is 'System.InvalidProgramException' in System.Net.Http.dll Additional information: Common Language Runtime detected an invalid program.
This is thrown while initializing the request object of controller to use in tests:
this.samplecontroller.Request = new HttpRequestMessage() { Properties = { { HttpPropertyKeys.HttpConfigurationKey, new HttpConfiguration() } } };
I'm struggling with this problem, any help would be greatly appreciated.
The .Net Framework i use is 4.6.1