合并Newtonsoft.Json时出现System.OutOfMemoryException [英] System.OutOfMemoryException when merging Newtonsoft.Json

查看:432
本文介绍了合并Newtonsoft.Json时出现System.OutOfMemoryException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个插件来调用Web服务.我需要序列化和反序列化Json对象.所以,我需要Newtonsoft.Json.我正在尝试在Visual Studio 2015中使用ILMerge.MSBuild.Task和ILMerge合并NewtonSoft.Json的dll和我的应用程序dll.

I am creating a plugin to call a webservice. I need to serialize and deserialize the Json object. So, I need Newtonsoft.Json. I am trying to merge the dll from NewtonSoft.Json and my application dll using ILMerge.MSBuild.Task and ILMerge in Visual Studio 2015.

我收到以下错误:

我在互联网上寻找解决方案,但找不到任何解决方案.

I looked for solution in internet but could not find any solution.

推荐答案

对于Visual Studio中的ILMerge,仅使用NuGet软件包管理器中的必需dlls

For ILMerge in VisualStudio Use the necessary dlls from NuGet Package Manager Only

我正在使用 MSBuild.ILMerge.Task 1.0.5 Newtonsoft.Json 的最新版本,并且遇到了这种类型的问题.

I was using the MSBuild.ILMerge.Task 1.0.5 and latest verson of Newtonsoft.Json and getting this type of issue.

我尝试通过降级到 Newtonsoft.Json版本10.0.3 来稳定版本,并且效果很好.

I tried with to stable version by downgrade to Newtonsoft.Json version 10.0.3 and it works well.

希望这会有所帮助!

这篇关于合并Newtonsoft.Json时出现System.OutOfMemoryException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆