Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDbContextOptionsExtensionWithDebugInfo issue #15192

Closed
michaelmfranz opened this issue Mar 28, 2019 · 4 comments
Closed

IDbContextOptionsExtensionWithDebugInfo issue #15192

michaelmfranz opened this issue Mar 28, 2019 · 4 comments
Labels
closed-no-further-action The issue is closed and no further action is planned. customer-reported

Comments

@michaelmfranz
Copy link

michaelmfranz commented Mar 28, 2019

What is not working as expected:


method: SqlServerDbContextOptionsExtensions.UseSqlServer("connectionstring");


Issue: spontaneously stopped working, looks like a missing type that it shouldnt be trying to use
as it has been merged 1/2 a year ago (issue #13238)


Exception message:


Message=Could not load type 'Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtensionWithDebugInfo' from assembly 'Microsoft.EntityFrameworkCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.


Stack trace:


at Microsoft.EntityFrameworkCore.SqlServerDbContextOptionsExtensions.UseSqlServer(DbContextOptionsBuilder optionsBuilder, String connectionString, Action1 sqlServerOptionsAction) at Telair.Model.Data.TelairContext.OnConfiguring(DbContextOptionsBuilder optionsBuilder) in C:\Project\TelairService\Telair.Model\Generated\TelairContext.cs:line 42 at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider() at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies() at Microsoft.EntityFrameworkCore.DbContext.get_Model() at Microsoft.EntityFrameworkCore.Internal.InternalDbSet1.get_EntityType()
at Microsoft.EntityFrameworkCore.Internal.InternalDbSet1.CheckState() at Microsoft.EntityFrameworkCore.Internal.InternalDbSet1.get_EntityQueryable()
at Microsoft.EntityFrameworkCore.Internal.InternalDbSet1.System.Linq.IQueryable.get_Provider() at System.Linq.Queryable.SingleOrDefault[TSource](IQueryable1 source, Expression`1 predicate)
at Telair.APIWrapper.GetService(String Vendor, String ServiceCode) in C:\Project\TelairService\Telair.API\ControllerHelpers\APIWrapper.cs:line 68
at Telair.Controllers.RadiusController.AddUser(String UserName, String Password) in C:\Project\TelairService\Telair.API\Controllers\RadiusController.cs:line 124
at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.d__12.MoveNext()


EF Core version 2.2.3
Microsoft.NETCore.Platforms: 3.0.0-preview3.19128.7


Microsoft Visual Studio Enterprise 2019 Preview
Version 16.0.0 Preview 4.4
VisualStudio.16.Preview/16.0.0-pre.4.4+28721.148
Microsoft .NET Framework
Version 4.7.03190

Installed Version: Enterprise

Visual C++ 2019 00435-60000-00000-AA109
Microsoft Visual C++ 2019

ADL Tools Service Provider 1.0
This package contains services used by Data Lake tools

Application Insights Tools for Visual Studio Package 9.0.20307.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2019 16.0.12307.51536
ASP.NET and Web Tools 2019
ASP.NET Core Blazor Language Services 16.0.19154.02

ASP.NET Web Frameworks and Tools 2019 16.0.12307.51536

@ajcvickers
Copy link
Member

@michaelmfranz This is a breaking change for 3.0. To use EF Core 3.0 you will need a database provider that has been updated for 3.0.

Note also that it looks like you have a mix of versions--some 3.0 preview versions, and some 2.2 versions. This is very unlikely to work correctly.

@ajcvickers ajcvickers added the closed-no-further-action The issue is closed and no further action is planned. label Mar 28, 2019
@michaelmfranz
Copy link
Author

@michaelmfranz This is a breaking change for 3.0. To use EF Core 3.0 you will need a database provider that has been updated for 3.0.

Note also that it looks like you have a mix of versions--some 3.0 preview versions, and some 2.2 versions. This is very unlikely to work correctly.

Hi, thanks for that, after I submitted this issue I noticed the very same thing and then I did upgrade and the result was the same. Luckily two days ago I zipped up my application and I will see if I can get that old version working with my newer code

@michaelmfranz
Copy link
Author

ok, my dlls got all messed up, they are in sync now, i think i forgot one of them was preview and that stuffed me up

@princeo911
Copy link

In my situation, I had my main project using the preview entityframeworkcore versions but I had a private nuget package that was using the current entityframeworkcore version so that stopped my project from being able to run, Once I upgraded the nuget package to use the preview versions, everything worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-no-further-action The issue is closed and no further action is planned. customer-reported
Projects
None yet
Development

No branches or pull requests

3 participants