c# - 错误:\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);
解决方案
关闭 VS
使用文本编辑器打开您的 .csproj 文件
查找 Newtonsoft 的所有提示路径标签
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
全部修复提示路径 - 仔细看,它可以在多个位置进行配置,而且 Nuget 对我来说并不是万无一失的。
推荐阅读
- python - 如何写入文件名中包含空格和特殊字符的文件?
- php - Eloquent:仅过滤具有相关“子”行的行
- ios - Flutter : 在 iOS 版本的 YouTube App 中打开视频
- javascript - 反应传单标记旋转
- javascript - 获取节点问题
- python - python - 编写一个字典,其值为不带括号的 csv 整数列表
- google-apps-script - 如何让谷歌表格根据排名重新排序
- javascript - 如何使用 JavaScript 选择字符串的最后一个字符?
- android - android webview onPageFinished从JavascriptInterface重定向到新页面?
- xml - XSLT1.0 :: 我想在 XML 中添加一个新元素,其后缀和命名空间作为其父元素