httpclient does not contain a definition for postasjsonasync code example
Example 1: postasjsonasync not found
Yes, you need to add a reference to
System.Net.Http.Formatting.dll
This can be found in the extensions assemblies area.
A good way of achieving this is by adding the NuGet package Microsoft.AspNet.WebApi.Client to your project.
Example 2: postasjsonasync reference c#
Install [NuGet package] Microsoft.AspNet.WebApi.Client & System.Net.Http.Formatting.Extension