title: converting an object to HttpContent
body: <p>While converting an object to HttpContent , compilation succeeds. But while running I am getting below error.</p>
  
  <blockquote>
    <p><strong><em>Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its
    dependencies.</em></strong></p>
  </blockquote>
  
  <p>My Code snippet:</p>
  
  <pre><code> JArray jarray = (JArray)response;  //response is of type var.    
   IEnumerable&lt;MyModelClass&gt; appResponse = jarray.ToObject&lt;IEnumerable&lt;MyModelClass&gt;&gt;();    
   HttpResponseMessage msg = new HttpResponseMessage();    
   msg.Content = new ObjectContent&lt;IEnumerable&lt;ConfigurationResponseDomainModel&gt;&gt;(appResponse, new JsonMediaTypeFormatter(), "application/json");
  </code></pre>
  
  <p>This line throws error. Assigning object to content. I am using Newtonsoft.Json(10.0.3). Any help will be appreciated.</p>