Admin.Net编译 报错:命名空间“Admin.NET.Core.Service.System”中不存在类型或命名空间名“Text”(是否缺少程序集引用?)
/// <summary> /// 外键显示字段 /// </summary> [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] public string FkDisplayColumns { get; set; }
报错:命名空间“Admin.NET.Core.Service.System”中不存在类型或命名空间名“Text”(是否缺少程序集引用?)
解决方案:
代码修改:
/// <summary> /// 外键显示字段 /// </summary> [Newtonsoft.Json.JsonIgnore] [JsonIgnore] public string FkDisplayColumns { get; set; }
添加引用:
using System.Text.Json.Serialization;