顯示具有 ASP.NET Core Identity 標籤的文章。 顯示所有文章
顯示具有 ASP.NET Core Identity 標籤的文章。 顯示所有文章

2020年6月4日 星期四

NET Core 2.1開始Identity UI被包進Razor Class Library

NET Core 2.1開始Identity UI被包進Razor Class Library
如果需要Identity Core的cshtml修改可以參考
指令產生
先安裝ASP.NET Core scaffolding engine
指令dotnet tool install -g dotnet-aspnet-codegenerator

指令dotnet aspnet-codegenerator identity 
需要先用NuGet安裝以下套件(用Visual Studio的Scaffolding Item會自動安裝)
Microsoft.VisualStudio.Web.CodeGeneration.Design 
Microsoft.AspNetCore.Identity.UI
Microsoft.EntityFrameworkCore.Design
Microsoft.EntityFrameworkCore.SqlServer

2020年6月3日 星期三

error CS0234: 命名空間 'Microsoft.AspNetCore.Identity' 中沒有類型或命名空間名稱 'UI' (是否遺漏了組件參考?)

因為Microsoft.AspNetCore.Identity.UI 3.1.4 只支援.NET Core 3.1以上
https://www.nuget.org/packages/Microsoft.AspNetCore.Identity.UI
所以要把專案升級到.NET Core 3.1以上


obj\Debug\netcoreapp3.0\SkillTreeRazorPageBlogSample.AssemblyInfo.cs(14,42): error CS0234: 命名空間 'Microsoft.AspNetCore.Identity' 中沒有類型或命名空間名稱 'UI' (是否遺漏了組件參考?) [D:\temptest\SkillTreeRazorPageBlogSample.csproj]
    0 個警告
    1 個錯誤

經過時間 00:00:03.72
RunTime 00:00:14.95