I installed my vsix project in a system in VS 2015 professional and during execution, I am getting the below exception in a method where I used PostAsJsonAsync().
Error:
System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<System.Net.Http.HttpResponseMessage> System.Net.Http.HttpClientExtensions.PostAsJsonAsync(System.Net.Http.HttpClient, System.String, !!0)'.
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
I have System.Net.Http and System.Net.Http.Formatting (System.Net.Http.Formatting.Extension nuget pkg) dll in vsix project.
I am getting this exception only in VS 2015 and not in VS 2017.
And I dont get this exception when I install the vsix in my system's VS 2013. Am I missing something?