当你的才华不能撑起你的野心时,就是你该选择学习的时候了!

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;

 

posted @ 2025-05-18 08:24  hofmann  阅读(38)  评论(0)    收藏  举报