HostAuthenticationAttribute not found
本文关键字:found not HostAuthenticationAttribute | 更新日期: 2023-09-27 17:57:57
这个错误一整天都让我发疯。我该如何修复它?我已经用Microsoft.AspNet.WebApi.Owin更新了NUGET,但仍然没有运气。
Error 11 The type or namespace name 'HostAuthenticationAttribute' could not be found (are you missing a using directive or an assembly reference?)
Error 12 The type or namespace name 'HostAuthentication' could not be found (are you missing a using directive or an assembly reference?)
// GET api/Account/ExternalLogin
[OverrideAuthentication]
**[HostAuthentication**(DefaultAuthenticationTypes.ExternalCookie)]
原来这些包有不同的版本,因为我在1解决方案中有多个项目,所以不容易看到。是的,可能很平凡,但请重新检查每件事三次,有时再看一眼会有所帮助。