cancel
Showing results for 
Search instead for 
Did you mean: 

Entity Framework 6 with VS 2013 problem and fix

Michael_Fischer
Explorer
8,148

Hello,

the problem with EF6 is solved for VS 2012 but still exists in VS 2013.

Everything is fine with SA 16.0.0.2052 and VS 2012 Update 4 now. Installed SA after VS, updated SA. Then:

  • add a Data Connection in the VS Server Explorer to the demo database
  • create a console app
  • install-package EntityFramework
  • add, new item, ADO.NET Entity Data Model, walk through assistent.

Works perfectly. No need to do anything fancy anymore.

Now the same in VS 2013 Update 3. This time, the assistant produces the well known error message "Your project references the latest version of Entity Framework; however ..." as described in this question.

The solution is to manually add the provider to the providers in the app.config (or web.config in web projects):

<provider invariantName="iAnywhere.Data.SQLAnywhere" type="iAnywhere.Data.SQLAnywhere.SAProviderServices, iAnywhere.Data.SQLAnywhere.EF6, Version=16.0.0.20524, Culture=neutral, PublicKeyToken=f222fc4333e0d400" />


Make sure the version is the exact version of your assembly depending on your patch level. This fix was one of the steps of the workaround described in the question mentioned above and it is still necessary!

VolkerBarth
Contributor
0 Kudos

In my understanding, Jeff's newer answer to the cited question and the cited CR #770760 description do tell that it is still necessary to add the provider to the according .config file (and they both tell that these are required steps, not workaorunds for older EBFs) so I would think the reported behaviour is still "as documented"... - though not what you are expecting, obviously.

Michael_Fischer
Explorer

You're right, Volker, I just wanted to point to the fact that - in VS 2012 - it works without any additional steps now. Just like with MS SQL Server and just like you would expect it. (And that I would like to see the same behaviour in VS 2013, of course.)

Former Member
0 Kudos

Have you registered the provider using "SetupVSPackage.exe /i /v EF6"? Worked for me using For me using SA 16.0.0.2158.

Accepted Solutions (0)

Answers (0)