Error on startup after upgrading from .Net Core 3.0 preview to .Net Core 3.0 release

0

I am using the same code in .Net Core 3.0 preview without any problem. After updating to Core 3.0 final release, I got this error:

System.TypeLoadException HResult=0x80131522 Message=Method 'get_Info' in type
'Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal.SqlServerOptionsExtension'
from assembly 'Microsoft.EntityFrameworkCore.SqlServer, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.

The line of code that has the exception is:

services.AddDbContext<ApplicationDbContext>(options =>
    options.UseSqlServer(
        Configuration.GetConnectionString("DefaultConnection")));

Googling this exception did not lead anywhere, any idea what is going on?

c#
.net
model-view-controller
.net-core
asked on Stack Overflow Oct 4, 2019 by bob mason • edited Oct 4, 2019 by dymanoid

1 Answer

0

Delete all previously published files (dlls are important to be deleted), upgrade all dependencies to previews for .net core 3.0 and then publish.

answered on Stack Overflow Oct 5, 2019 by wast

User contributions licensed under CC BY-SA 3.0