【发布时间】:2021-01-30 05:55:29
【问题描述】:
有人在任何 .Net Core 项目中使用过 NToastNotify 包吗?这是我的一个描述性问题。我按照此处列出的说明进行操作(对于 Noty,请阅读 Noty 的文档说明)-https://github.com/nabinked/NToastNotify
我得到的错误 -
找不到类型或命名空间名称“IToastNotification” (您是否缺少 using 指令或程序集引用?)
找不到类型或命名空间名称“NToastNotify”(您是 缺少 using 指令或程序集引用?)
在尝试实施包的相关空间中。
例如在控制器中
private readonly IToastNotification _toastNotification;
public AccountsController(UserManager<AppUser> userManager, IToastNotification toastNotification, SignInManager<AppUser> signInM, ILogger<AccountsController> logger, ApplicationDbContext appDbContext)
{
_logger = logger;
_signInManager = signInM;
_userManager = userManager;
_appDbContext = appDbContext;
_toastNotification = toastNotification;
}
知道可能是什么问题吗?我也与CodeGeneration.Design 包发生冲突。于是卸载重装。是否对项目进行了清理和重建。这似乎不能解决问题。
值得一提的是,项目位于 .Net Core 2.2 中。这会是麻烦吗?版本冲突?指针,从哪里开始纠正这个问题。
【问题讨论】:
-
您是否缺少 using 指令?
-
如何定位到
net core 3.1,然后重建您的项目? -
@PerryQian-MSFT -- 会尝试的。下面的答案也密切建议了一些东西。我想知道,有理由否决这个问题。具体原因?
标签: asp.net-core .net-core nuget code-generation