When I register the following using
declaration:
using Microsoft.AspNetCore.Identity.UI;
I am getting the following error:
'UI' type or namespace name does not exist in namespace 'Microsoft.AspNetCore.Identity' (missing an assembly reference?)
Everything looks right to me. I'm including a <PackageReference>
to the Microsoft.AspNetCore.Identity.UI
NuGet package. But the error persists.
How do I troubleshoot this?
My .csproj
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.1.4" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="3.1.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SQLite" Version="3.1.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.3" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.1.1" />
</ItemGroup>
</Project>
And my AssemblyInfo.cs
:
using System;
using System.Reflection;
[assembly: Microsoft.AspNetCore.Identity.UI.UIFrameworkAttribute("Bootstrap4")]
[assembly: System.Reflection.AssemblyCompanyAttribute("ESporcum")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("ESporcum")]
[assembly: System.Reflection.AssemblyTitleAttribute("ESporcum")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
In NuGet package
change this:
Microsoft.AspNetCore.Identity.UI Ver.5.0.1
to:
Microsoft.AspNetCore.Identity.UI Ver.3.1.10
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With