-
Hello, We would like to migrate our project .net core 3.1 to .net 5.0. We are using Microsoft.AspNetCore.Identity 2.2.0 and we didn't see any update for this package for .net 5.0 framework. Is it okey to migrate .Net 5.0 environment without exception ? Or Is there any documantation about Identity with .net 5.0 ? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You shouldn't have been using the 2.2.0 package in 3.1. Identity (and a lot of other stuff) became part of the reference assembly, and no more external packages where needed. For a basic 3.1 app, with identity and a UI you would have a project that looks like this: <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<CopyRefAssembliesToPublishDirectory>false</CopyRefAssembliesToPublishDirectory>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="3.1.8" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.8" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="3.1.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.8" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.8" />
</ItemGroup>
</Project> You can see that there are no package references to <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<CopyRefAssembliesToPublishDirectory>false</CopyRefAssembliesToPublishDirectory>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.0" />
</ItemGroup>
</Project> |
Beta Was this translation helpful? Give feedback.
You shouldn't have been using the 2.2.0 package in 3.1. Identity (and a lot of other stuff) became part of the reference assembly, and no more external packages where needed.
For a basic 3.1 app, with identity and a UI you would have a project that looks like this: