After adding another Dbcontext i got this error
Could not load type 'Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtensionWithDebugInfo' from assembly 'Microsoft.EntityFrameworkCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
Code where error trigers:
services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
.csproj
`
<TargetFramework>netcoreapp3.0</TargetFramework>
<UserSecretsId>aspnet-ZavrsniRad01-F04B6A7E-6450-4254-8092-F42843F4615A</UserSecretsId>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="3.0.0-preview6.19307.2" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.0.0-preview6.19307.2" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="3.0.0-preview6.19307.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0-preview.18572.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0-preview6.19304.10" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.0.0-preview6.19304.6" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.0.0-preview6-19319-03" />
`
You need to align all the pages you are using from ASP.NET Core. Please use preview6 package for EFCore.SqlServer.
Indeed, that solved my issue i had to install preview6 and now it works.
Thank you good man of GitHub.
Most helpful comment
You need to align all the pages you are using from ASP.NET Core. Please use preview6 package for EFCore.SqlServer.