这在经典 .NET 上运行良好:
string json = JsonConvert.SerializeObject(new Exception("Test"));
但它在 WinRT (RP) 上失败了:
Error getting value from 'TargetSite' on 'System.Exception'.
The API 'System.Exception.get_TargetSite()' cannot be used on the current platform. See http://go.microsoft.com/fwlink/?LinkId=248273 for more information.
编辑:我还需要通过电线传输异常并在后端对其进行反序列化。
有人有任何解决方法吗?