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

Could not load file or assembly #825

Closed
lsvMoretti opened this issue Sep 20, 2019 · 12 comments
Closed

Could not load file or assembly #825

lsvMoretti opened this issue Sep 20, 2019 · 12 comments

Comments

@lsvMoretti
Copy link

Please see this issue, I am not sure on how to get this resolved. I am using the latest version of .net core 3.0 SDK (RC1), Pomelo for EF. When recently updated, my project has stopped working. No code has been changed.

https://github.com/dotnet/coreclr/issues/26791

@lauxjpn
Copy link
Collaborator

lauxjpn commented Sep 20, 2019

Pomelo's provider does not yet support EF Core 3.0.
The upgade is being merged in a couple of hours though and a prerelease package will be out soon.

@lsvMoretti
Copy link
Author

Pomelo's provider does not yet support EF Core 3.0.
The upgade is being merged in a couple of hours though and a prerelease package will be out soon.

Brilliant, thanks. I'll await for the update.

@lsvMoretti
Copy link
Author

lsvMoretti commented Sep 22, 2019

System.TypeLoadException: Method 'get_Info' in type 'Pomelo.EntityFrameworkCore.MySql.Infrastructure.Internal.MySqlOptionsExtension' from assembly 'Pomelo.EntityFrameworkCore.MySql, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

This is using branch 3.0?

@lauxjpn
Copy link
Collaborator

lauxjpn commented Sep 22, 2019

Pomelo.EntityFrameworkCore.MySql, Version=2.2.0.0

This suggests that you are using the last official release, which is this one:
https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/releases/tag/2.2.0

It is compatible with EF Core 2.2 but not with EF Core 3.0.

For EF Core 3.0 compatibility, you could clone and build from the 3.0.0-wip branch if you like, or wait a little bit for an official preview on nuget, which will be out soon.

Also, it should be possible to use .NET Core 3.0 with EF Core 2.2 and Pomelo's MySQL 2.2.0.

@lsvMoretti
Copy link
Author

Yeah for some reason I have cloned the branch and built but it's throwing another error up. I have also tried using SQL with Entity Framework and I get the above error still.

@lauxjpn
Copy link
Collaborator

lauxjpn commented Sep 22, 2019

You can provide us with a test repo, if you like. I will take a look at it.

@lsvMoretti
Copy link
Author

I have added you into the repo @lauxjpn and created an issue with some links

https://github.com/lsvMoretti/Los-Santos-V/issues/12

@lauxjpn
Copy link
Collaborator

lauxjpn commented Sep 23, 2019

This issue is unrelated to us. I will close it therefore.

@lauxjpn lauxjpn closed this as completed Sep 23, 2019
@lsvMoretti
Copy link
Author

@lauxjpn I seem to be getting this error now

ystem.TypeLoadException: Method 'get_Info' in type 'Pomelo.EntityFrameworkCore.MySql.Infrastructure.Internal.MySqlOptionsExtension' from assembly 'Pomelo.EntityFrameworkCore.MySql, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
   at Microsoft.EntityFrameworkCore.MySqlDbContextOptionsExtensions.UseMySql
   at Server.Context.OnConfiguring(DbContextOptionsBuilder optionsBuilder) in F:\Andrew\Documents\Los Santos V\Development\Github\Los-Santos-V\Server\Context.cs:line 50
   at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
   at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies()
   at Microsoft.EntityFrameworkCore.DbContext.get_Model()
   at Microsoft.EntityFrameworkCore.Internal.InternalDbSet`1.get_EntityType()
   at Microsoft.EntityFrameworkCore.Internal.InternalDbSet`1.get_EntityQueryable()
   at Microsoft.EntityFrameworkCore.Internal.InternalDbSet`1.System.Linq.IQueryable.get_Provider()
   at System.Linq.Queryable.Where[TSource](IQueryable`1 source, Expression`1 predicate)
   at Server.Vehicle.LoadVehicle.ResetAllVehiclesSpawnStatus() in F:\Andrew\Documents\Los Santos V\Development\Github\Los-Santos-V\Server\Vehicle\LoadVehicle.cs:line 21

@lsvMoretti
Copy link
Author

lsvMoretti commented Sep 24, 2019

This is also using the 3.0.0 wip branch as well as stable 2.2.0

@lauxjpn
Copy link
Collaborator

lauxjpn commented Sep 24, 2019

The message seems to indicate, that you are using .Net Core 3.0 with EF Core 3.0 and Pomelo.MySql 2.2.0, which is not supported.
See #797 (comment)

However, the following is a working scenario with .Net Core 3.0 (established in #797 (comment)):

It should be possible to use .NET Core 3.0 together with EF Core 2.2 and Pomelo's MySQL 2.2.0.

You could also just use the dependencies from the project file content I first posted to the issue thread we were working in. It uses the exact setup talked about in #797 (comment) .

@lauxjpn
Copy link
Collaborator

lauxjpn commented Sep 25, 2019

If the problem persists, post us your project file content or all <PackageReference /> tags of your project file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants