Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type <MyClass> : <p>This code:</p>

<pre><code>var commandMessage = new CommandMessage { CorrelationId = Guid.NewGuid() };
var json = JsonConvert.SerializeObject(commandMessage);
var myCommandMessage = (CommandMessage)JsonConvert.DeserializeObject(json);
</code></pre>

<p>gives this error message:</p>

<pre><code>Additional information: Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type 'QueueConnectionStringTester.CommandMessage'
</code></pre>

<p>This is the CommandMessage class:</p>

<pre><code>public class CommandMessage
{
    public Guid CorrelationId { get; set; }        
}
</code></pre>

<p>What am I missing here? </p>
