【发布时间】:2022-01-05 16:06:00
【问题描述】:
using Newtonsoft.Json;
namespace XX.XX.XX.XX
{
public class Geolocation
{
[JsonProperty(PropertyName = "postal_code")]
public string PostalCode { get; set; }
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
[JsonProperty(PropertyName = "message")]
public string Message { get; set; }
}
}
上面的代码我遇到了下面的构建错误
严重性代码描述项目文件行抑制状态 错误 CS0433 类型“JsonPropertyAttribute”同时存在于“NestV5, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null”和“Newtonsoft.Json, Version=7.0.0.0”中,
【问题讨论】:
标签: json.net .net-4.7.1