title: System.Security.Permissions missing when invoking JsonConvert.DeserializeObject<T> in .NET Core 2.0
body: <p>I am currently looking at using .NET Core 2.0 so that I can run my app on multiple platforms. </p>
  
  <p>One thing I need to do is take an incoming string and deseralise it into an object. e.g.</p>
  
  <pre><code>var resultingObject = JsonConvert.DeserializeObject&lt;MyDataContract&gt;(request);
  </code></pre>
  
  <p>In full .NET, this would run and return me my object. However in .NET Core 2.0 I get the following exception</p>
  
  <pre><code>Could not load file or assembly 'System.Security.Permissions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
  at Newtonsoft.Json.Serialization.JsonTypeReflector.get_DynamicCodeGeneration()
   at Newtonsoft.Json.Serialization.JsonTypeReflector.get_ReflectionDelegateFactory()
   at Newtonsoft.Json.Serialization.DefaultContractResolver.GetDefaultCreator(Type createdType)
   at Newtonsoft.Json.Serialization.DefaultContractResolver.InitializeContract(JsonContract contract)
   at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateObjectContract(Type objectType)
   at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract(Type objectType)
   at Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract(Type type)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
  </code></pre>
  
  <p>After some reading around I found this on StackOverflow which suggests that this kind of operation is not permitted in .NET Core <a href="https://stackoverflow.com/a/38385774/1211743">https://stackoverflow.com/a/38385774/1211743</a></p>
  
  <p>Does anyone have any insight?</p>