Skip to content

.NET Core 3 Support #44

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

Closed
pbros opened this issue Sep 23, 2019 · 27 comments
Closed

.NET Core 3 Support #44

pbros opened this issue Sep 23, 2019 · 27 comments

Comments

@pbros
Copy link

pbros commented Sep 23, 2019

Hello,

What is the expected timeline for .NET Core 3 support now that it has been officially released?

Thank you

@alexkeh
Copy link
Member

alexkeh commented Sep 27, 2019

Oracle is currently running its .NET Core test suites against ODP.NET Core. We plan to release a new version that is .NET Core 3 certified on the NuGet Gallery in the next couple weeks, plus or minus. It's hard to give an exact timeline as we don't know what testing will find until we find issues, then fix them.

@pbros
Copy link
Author

pbros commented Oct 3, 2019

Do you know if the next release will also support ASP.Net Identity?

@alexkeh
Copy link
Member

alexkeh commented Oct 3, 2019

No, the release coming up in about a week or so will not have ASP.NET Identity support.

@lordkyuusei
Copy link

Hey!
Anything new since the last two weeks regarding .NET Core 3 support? I believe that this is a highly anticipated update for developers that wish to upgrade their oracle-db .net apps.

@alexkeh
Copy link
Member

alexkeh commented Oct 9, 2019

We're finishing up our testing this week. The release is planned for next week if no major showstoppers come up.

@0x4Graham
Copy link

0x4Graham commented Oct 16, 2019

Hey,

Would supporting .net core 3 fix an issue I am having when connecting to Oracle DB?

OraBufWriter:ReadResetResponse - Unexpected Packet received

ORA-04088: error during execution of trigger 'SYSTEM.LOGONTRG'.ORA-00604: errorred at recursive SQL level 1.

ORA-06502: PL/SQL: numeric or value error: character string buffer too small.

ORA-06512: at "SYSTEM.LOG_SESSION_INFO", line 38.ORA-06512: at line 2.

The issue I am having is rather interesting though. When running the application on my local, it can connect to the DB perfectly even though when I am using .NET Core 3.

But when I deploy to our Kubernetes instance I get the above error.

@alexkeh
Copy link
Member

alexkeh commented Oct 16, 2019

@grey007

Most likely, you are encountering a Kubernetes-specific related issue, not one related to .NET Core 3. Oracle hasn't seen an issue similar to yours in testing in a non-Kubernetes environment either. OTOH, we have seen a bug similar to yours in .NET Core 2 that was also running in Kubernetes.

@alexkeh
Copy link
Member

alexkeh commented Oct 16, 2019

ODP.NET Core 19.5 has just been released. This new version supports .NET Core 3.
https://www.nuget.org/packages/Oracle.ManagedDataAccess.Core/

@alexkeh alexkeh closed this as completed Oct 16, 2019
@CJ18874
Copy link

CJ18874 commented Oct 21, 2019

Still not working with .NET Core 3. Any temporary workaround?

@alexkeh
Copy link
Member

alexkeh commented Oct 21, 2019

How is ODP.NET Core not working in .NET Core 3? Please share as much error info as you can. Otherwise, it's impossible to advise on a workaround.

@CJ18874
Copy link

CJ18874 commented Oct 21, 2019

PM> Scaffold-DbContext "User Id=<>;Password=<>;Data Source=<>/<>;" Oracle.EntityFrameworkCore -OutputDir Models
System.TypeLoadException: Method 'Create' in type 'Oracle.EntityFrameworkCore.Scaffolding.Internal.OracleDatabaseModelFactory' from assembly 'Oracle.EntityFrameworkCore, Version=2.0.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342' does not have an implementation.
at Oracle.EntityFrameworkCore.Design.Internal.OracleDesignTimeServices.ConfigureDesignTimeServices(IServiceCollection serviceCollection)
at Microsoft.EntityFrameworkCore.Design.Internal.DesignTimeServicesBuilder.ConfigureDesignTimeServices(Type designTimeServicesType, IServiceCollection services)
at Microsoft.EntityFrameworkCore.Design.Internal.DesignTimeServicesBuilder.ConfigureProviderServices(String provider, IServiceCollection services, Boolean throwOnError)
at Microsoft.EntityFrameworkCore.Design.Internal.DesignTimeServicesBuilder.Build(String provider)
at Microsoft.EntityFrameworkCore.Design.Internal.DatabaseOperations.ScaffoldContext(String provider, String connectionString, String outputDir, String outputContextDir, String dbContextClassName, IEnumerable1 schemas, IEnumerable1 tables, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContextImpl(String provider, String connectionString, String outputDir, String outputDbContextDir, String dbContextClassName, IEnumerable1 schemaFilters, IEnumerable1 tableFilters, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContext.<>c__DisplayClass0_0.<.ctor>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Method 'Create' in type 'Oracle.EntityFrameworkCore.Scaffolding.Internal.OracleDatabaseModelFactory' from assembly 'Oracle.EntityFrameworkCore, Version=2.0.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342' does not have an implementation.
PM>

@alexkeh
Copy link
Member

alexkeh commented Oct 21, 2019

@CJ18874 EF Core 3 is not supported yet. Only .NET Core 3 is supported. EF Core 3 requires a new implementation from provider writers, which is what the Oracle team is working for its next EF Core version.

@alexkeh
Copy link
Member

alexkeh commented Oct 21, 2019

The workaround is to use EF Core 2.

@LucaGabi
Copy link

How can I use EF Core 2 ?

I have to downgrade from dotnet core 3 ?

@alexkeh
Copy link
Member

alexkeh commented Feb 27, 2020

@LucaGabi You can create a .NET Core 3 project, then add the Oracle EF Core 2 assembly, which will pull in EF Core 2 dependencies.

@iAmBipinPaul
Copy link

any expected date , when EF Core 3 support will be available ?

@alexkeh
Copy link
Member

alexkeh commented Feb 28, 2020

@iAmBipinPaul My personal best guess is April for the beta. I'm hoping in the early part of the month. As the dev team has fixed the bugs found, the remaining ones are fewer, but harder to resolve. There is no specific date we're trying to meet. We're working through the key issues as quickly as possible.

Oracle EF Core 3 has a feature bound release target, not a time bound target. In a time bound scenario, the product ships on a specific date. Any features that don't meet a completeness or quality control threshold by then are removed/disabled from the release. The remaining features ship.

In a feature bound target, the product ships only when the completeness and quality control thresholds are met. For example, you don't want 10% of your LINQ to generate invalid Oracle SQL. You need that to be as close to 100% as possible.

A framework like EF Core has the additional complication that it isn't a typical API such that each provider writer picks and chooses the classes and class members to implement; each API accomplishes a generally simple, discrete task; and the customer has the choice to use each individual API or not.

The provider writer has to support all of LINQ, all its behavior when a customer composes an arbitrary LINQ statement, and execute it in a highly performant manner.

@iAmBipinPaul
Copy link

iAmBipinPaul commented Feb 29, 2020

Okay , Thank you for the explanation.
I'm trying to connect to Oracle free autonomous database from EF core 2.2 and i'm getting this erro.

2020-02-29 09:05:33.304378 ThreadID:1   (ERROR)   OracleDatabaseCreator.Exists() :  OracleException.Number: 12537
2020-02-29 09:05:33.307641 ThreadID:1   (ERROR)   OracleDatabaseCreator.Exists() :  Oracle.ManagedDataAccess.Client.OracleException (0x80004005): ORA-12537: Network Session: End of file
 ---> OracleInternal.Network.NetworkException (0x000030F9): ORA-12537: Network Session: End of file
   at OracleInternal.Network.OracleCommunication.DoConnect(String tnsDescriptor)
   at OracleInternal.Network.OracleCommunication.Connect(String tnsDescriptor, Boolean doNAHandshake, String IName, ConnectionOption CO)
   at OracleInternal.ServiceObjects.OracleConnectionImpl.Connect(ConnectionString cs, Boolean bOpenEndUserSession, OracleConnection connRefForCriteria, String instanceName)

Connection String format

 "ConnectionString": "User Id=ADMIN;Password=Password;Data Source=<adb....>.oraclecloud.com;"

so basically how to connect from these connection strings

image

Thank you :) !

@alexkeh
Copy link
Member

alexkeh commented Feb 29, 2020

@iAmBipinPaul
See #59 (comment)

@alexandis
Copy link

alexandis commented Nov 25, 2020

I have similar error message, but in late 2020 with different DLL version:

TypeLoadException: Method 'Create' in type 'Oracle.EntityFrameworkCore.Query.Internal.OracleQueryableMethodTranslatingExpressionVisitorFactory' from assembly 'Oracle.EntityFrameworkCore, Version=3.1.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342' does not have an implementation.

Running netcoreapp3.1 host. I've checked the DLL in reflector and of course the method is in place. So have no idea what this error means...

@alexkeh
Copy link
Member

alexkeh commented Nov 25, 2020

Usually this occurs if one of your assemblies require EF Core 5 reliant, such as a newer version of Microsoft.EntityFrameworkCore.Tools. The runtime may be .NET Core 3.1, but all the loaded assemblies have to be able to use EF Core 3.1 and .NET Core 3.1 as well.

@alexandis
Copy link

alexandis commented Nov 25, 2020

Usually this occurs if one of your assemblies require EF Core 5 reliant, such as a newer version of Microsoft.EntityFrameworkCore.Tools. The runtime may be .NET Core 3.1, but all the loaded assemblies have to be able to use EF Core 3.1 and .NET Core 3.1 as well.

Hmm.. Thank you. But is there some troubleshooting instrument to find the root cause? The truth is I have a lot of dependencies in the project, also it references another projects (they are netstandard2.1) in the solution as well as 3rd party framework (ABP)...

image

@alexkeh
Copy link
Member

alexkeh commented Nov 25, 2020

You are using Microsoft.EntityFrameworkCore 5.0. Try downgrading that to version 3.1.x and running the app again.

@alexandis
Copy link

@alexkeh You are amazing! It works now! Without your help I'd be stuck for a while. Thank you very much.

@marcofacchetti
Copy link

Hi alexkeh I have the same problem with my application. i migrated from netcore 2.2 to 3.1 and had no problems.
Now I have upgraded to net 5.0 version but I get this error when creating the dbcontext

System.TypeLoadException: Method 'Create' in type 'Oracle.EntityFrameworkCore.Query.Internal.OracleQueryableMethodTranslatingExpressionVisitorFactory' from assembly 'Oracle.EntityFrameworkCore, Version = 3.1.19.1, Culture = neutral, PublicKeyToken = 89b483f429c47342.

Do you have any suggestions

@alexkeh
Copy link
Member

alexkeh commented Jan 13, 2021

@marcofacchetti EF Core 5 isn't supported yet. We're working on releasing the Oracle EF Core 5 provider by the end of this month.

@hnoerdli
Copy link

hnoerdli commented Feb 3, 2021

You are using Microsoft.EntityFrameworkCore 5.0. Try downgrading that to version 3.1.x and running the app again.

This solved my problem too.

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

No branches or pull requests

10 participants