1 2 Previous Next 21 Replies Latest reply on Nov 16, 2018 4:13 AM by Christian.Shay -Oracle Go to original post
      • 15. Re: Issue with Entity Framework with VS2017
        kakiyama-Oracle

        Hi All,

         

        For those having this issue...

         

        1) What is the DB version that you're using?

        2) Does the issue go away if you configure TNS_ADMIN in the app.config/web.config that points to the location that has your data source alias defined within a tnsnames.ora file?

         

        Assuming ODP.NET 12.2.01.0 is being used, a sample app.config may look as follows with TNS_ADMIN set.  Please change the directory location of your tnsnames.ora and the version # of the Oracle.ManagedDataAccess.dll that you're using in the <configSections> as appropriate.

         

        <?xml version="1.0" encoding="utf-8" ?>

        <configuration>

          <configSections>

            <section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />

          </configSections>

            <oracle.manageddataaccess.client>

              <version number="*">

                <dataSources>

                  <settings>

                    <setting name="TNS_ADMIN" value="C:\app\client\user\product\12.2.0\client_1\Network\Admin" />

               </settings>

             </version>

          </oracle.manageddataaccess.client> 

        </configuration>

        • 16. Re: Issue with Entity Framework with VS2017
          Anderson Perim

          I have Oracle 11g R2 version in database server. I have the last update of visual studio and the latest version of ManagedDriver. Today i tried to use by TNS option and Entity Data Model Wizard crash after choose connection.

          • 17. Re: Issue with Entity Framework with VS2017
            Alex Keh - Product Manager-Oracle

            For the users that observe the EDM wizard disappear/crash/go away around the time they are choosing a DB connection to use, I have encountered the same issue before. To fix the issue, verify the first Server Explorer (SE) connection (i.e. the one at the top) works. Just try to open it and make sure it can connect. If it can't connect, fix/replace/delete it so that the first SE connection works.

             

            Once done, try using the EDM wizard again. It should not disappear this time if it's the same issue I've encountered before.

             

            Another possible reason is the scenario kakiyama-Oracle points out in his post. Check if your TNS_ADMIN is set to point to where the data source alias is expected to be.

            1 person found this helpful
            • 18. Re: Issue with Entity Framework with VS2017
              3810010

              I'm having this exact issue too. Steps so far:

              1. uninstalled ODT

              2. installed newest version of ODT from oracle.  Installed Version 12.2.1200 using all wizard defaults.

              3. run VS2017 and open Server Explorer, added an Oracle Connection, applied Filters so the relevant tables are visible

              4. create new solution and empty project

              5. use Nuget to install Oracle.ManagedDataAccess.EntityFramework version 18.3.0.  This also installed two dependencies, Oracle.ManagedDataAccess version 18.3.0 and EntityFramework version 6.0.0.  (note: had to close VS2017 and reopen project for EF 6.0.0 to be visible in the NuGet package manager).

              6. <rclick prj>Add New Item, select ADO.NET Entity Data Model, click Add button.  This runs the Entity Data Model Wizard

              7 . select "EF Designer from database" and click Next

              8.  select the correct connection, select "Yes, include the sensitive data in the connection string", and click Next

              9.  a dialog briefly pops up before disappearing.  On it has one radio button with EF 6.x.x selected.

               

              I can't get the Wizard to go any further.  There are no error messages and no code is added to my project.

               

              What am I doing wrong?

               

              P.S. I even updated the EntityFramework to the latest stable release 6.2.0 and that doesn't work either.

              • 19. Re: Issue with Entity Framework with VS2017
                1021767

                Hi,

                 

                I've exactly the same problem here. I remember that i had one or two years ago a similar problem with a WPF wizard insight Visual Studio 2013. I've reported the problem to Microsoft and they have contacted me with a procedure in order to reproduce the problem and then catch + dump all the exceptions that happened insight the Visual Studio process memory. Finally they could fix the bug.

                For our problem now, I've opened a second instance of Visual Studio 2017.

                 

                In this second instance of VS, configure your exception settings tab (usually in the windows in the bottom of your IDE) and specify that you want all "Common Language Runtime Exception". In the menu "Debug", "Attach to process" (tick "show  processes from all users), you select the process devenv.exe (be sure to select the right process with the solution from where you try to create "ADO.NET Entity Data Model" (the column "title" in the process explorer window should help you to identify it).

                 

                Then switch back to the VS instance with your EF solution, and try to create your entity data model (EF Designer from database). In the window "Choose your Data Connection", fill up the fields and click the button Finish (a window appears quickly and disappears).

                You should be able to see now in the output window of the second instance of VS (The one where you are debugging the process) all uncaught exceptions that were raised.

                 

                Exception thrown: 'System.ArgumentException' in Oracle.ManagedDataAccess.EntityFramework.dll

                Exception thrown: 'System.Data.Entity.Core.ProviderIncompatibleException' in EntityFramework.dll

                Exception thrown: 'Microsoft.VisualStudio.TemplateWizard.WizardCancelledException' in Microsoft.Data.Entity.Design.dll

                Exception thrown: 'System.Runtime.InteropServices.COMException' in Microsoft.VisualStudio.Shell.15.0.dll

                 

                We can see 4 exceptions and maybe the second exception give us the reason : ProviderIncompatibleException. I do not know the reason of this exception....

                 

                If one of you has an idea?

                 

                Cheers,

                Fred

                • 20. Re: Issue with Entity Framework with VS2017
                  1021767

                  Hi,

                   

                  Obviously, the new version 18.3 of Managed Data access drivers is not yet compatible yet with the "Entity Model creation Wizard". Maybe a new package for the ODT (Visual Studio 2017 Oracle developer tools) should be released with the new managed version of the drivers?

                   

                  Anyway, I've downgraded my "managed data access" components (including entity framework) to version 12.1.100 and now everything works correctly (this version is compatible with the version of the developer tools ODTforVS2017_122011.exe).

                   

                  BR.

                  Fred.

                  • 21. Re: Issue with Entity Framework with VS2017
                    Christian.Shay -Oracle

                    Hi all,

                     

                     

                    We have released a new version of ODT (18.3) that should fix this issue. Please use ODT 18.3 if you are using ODP.NET 18.3 in your project and using the Entity Framework wizard.

                     

                    https://www.oracle.com/technetwork/topics/dotnet/downloads/odacmsidownloadvs2017-3806459.html

                    1 2 Previous Next