首页 > 解决方案 > 错误:\Bin\Newtonsoft.Json.Net20.dll 和 \Bin\Newtonsoft.Json.dll 中都存在“Newtonsoft.Json.Linq.JObject”类型

问题描述

/* 如果我在删除 Newtonsoft.Json.dll 之后进行构建,那么它可以正常工作,但是在清理和构建之后得到相同的错误?*/

using System;
using System.Web;
using System.Data;
using System.Collections;
using localhost;
using System.Text;
using System.Collections.Generic;
using System.Net.Mail;
using System.Net;
using BusinessLayerGDS.Model;
using BusinessLayerGDS.BAL;
using System.IO;
using System.Security.Cryptography;
using System.Linq;
using System.Configuration;
using Newtonsoft.Json.Linq;
using System.Text.RegularExpressions;
using System.Xml;



**And The codes:**
Newtonsoft.Json.Linq.JObject objActualData=Newtonsoft.Json.Linq.JObject.Parse(strResponse);

标签: c#asp.net

解决方案


关闭 VS

使用文本编辑器打开您的 .csproj 文件

查找 Newtonsoft 的所有提示路径标签

<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>

全部修复提示路径 - 仔细看,它可以在多个位置进行配置,而且 Nuget 对我来说并不是万无一失的。


推荐阅读