Can't find ADO.net Entity Data Model template in VS2017

102,152

Solution 1

  1. Go to Tools -> Get Tools and features
  2. Select Individual components tab and check Entity Framework 6 tools under SDK's, libraries, and framework section

Solution 2

It seems you added "Class Library (.NET Standard)" which is not supporting ADO.net Entity Data Model. You may add "Class Library (.NET Framework)"

Solution 3

For those of you trying the other solutions and still not seeing the templates...

Perhaps you are attempting to add ADO EF to a .NET Core 2.0 project, and EF is not supported out of the box.

You have 2 options:

  1. Install Core 2.0 SDK and NuGet that is aware of .NET Standard 2.0
  2. Use a .NET 4.x project rather than Core

I recommend #1. VS 2017 doesn't actually have the full Core 2.0 SDK installed, nor is it available from the VS installer (which many comments here struggle with).

I know, confusing, right?

From Microsoft:

"You will need to download and install a version of the .NET Core 2.0 SDK that is appropriate to your platform. This is true even if you have installed Visual Studio 2017 version 15.3."

"In order to use EF Core 2.0 or any other .NET Standard 2.0 library with a .NET platforms besides .NET Core 2.0 (e.g. with .NET Framework 4.6.1 or greater) you will need a version of NuGet that is aware of the .NET Standard 2.0 and its compatible frameworks"

https://blogs.msdn.microsoft.com/dotnet/2017/08/14/announcing-entity-framework-core-2-0/

Now... got all that installed and still not seeing the ADO template? I believe that is because it is deprecated/obsolete. This is the way to get EF working in .NET Core: https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/existing-db

Hope this helps! You're welcome.

Solution 4

I had to create a new project using .Net 4.5.2 then I was able to add the ADO.NET Entity Data Model.

  1. File -> New Project
  2. Select Web -> ASP.NET Web Application (.NET Framework)
  3. Set Framework at bottom of window to .NET Framework 4.5.2 enter image description here
  4. Use Empty Template enter image description here
  5. Right click project (not your solution) -> Add -> New Item
  6. Select Data -> ADO.NET Entity Data Model enter image description here

Solution 5

Tools-->Click Get Tools and Features-->Click on Modify--> Click on Individual components--> Tick the CheckBox of Entity Framework 6 Tools -->click on Modify--> You'll get a pop up window-->click on Retry(if it not closed, Click on Continue)

Now Launch VS and this time check in Data ADO.NET Entity Model will be added.

Please Check this Article http://dotnet-jigyasa.blogspot.com/2018/03/adonet-entity-data-model-missing-visual.html Worked for me.

Share:
102,152

Related videos on Youtube

Sandaru
Author by

Sandaru

Software Engineer. I have years of experience in Software Engineering and related technologies.

Updated on July 09, 2022

Comments

  • Sandaru
    Sandaru almost 2 years

    I was trying to create an ASP.NET MVC web application in Visual Studio 2017. I need to take an EF database-first approach for the work.

    Unfortunately I can't find the ADO.NET Entity Data Model template in my "Data" template folder:

    enter image description here

    I have tried following suggestions which didn't work for me.

    1. Installing Entity Framework 6.x via NuGet
    2. Installing package manually by double clicking latest msi file
    3. Changing .NET version from 4.6.x to 3.5

    NOTE: I have VS 2015 and VS 2017 both installed on my machine. Only VS 2017 has the problem.

    I have created the ASP.NET MVC project as follows:

    File -> New -> Project -> Web -> ASP.NET Web Application (.NET Framework) -> MVC
    

    Does anyone know a solution for this problem?

    • Vishvadeep singh
      Vishvadeep singh almost 7 years
      Can you try repairing the installation of Visual Studio
    • Sandaru
      Sandaru almost 7 years
      Tried.... its not working :(
    • Vishvadeep singh
      Vishvadeep singh almost 7 years
    • ErikEJ
      ErikEJ almost 7 years
      Did you install the Desktop development workload?
    • Sandaru
      Sandaru almost 7 years
      @ErikEJ What is that can you explain a bit
    • ErikEJ
      ErikEJ almost 7 years
      You select what components to install during VS setup, and you must make sure the EF Tools are installed, either via a workload or as an individual component
    • magicandre1981
      magicandre1981 almost 7 years
      in individual components tab during VS2017 setup select EF6 tools
    • Sandaru
      Sandaru almost 7 years
      @ErikEJ EF tools are there for sure.
    • Mubarek
      Mubarek over 6 years
      @Sandaru May be do it again. Follow these steps (it worked for me) Go to Tools > Extensions and updates and goto online and search for Entity Framework 6 Power Tools
  • Sandaru
    Sandaru almost 7 years
    I already tried this. This is not working for ultimate edition :) .. Thanks for the suggestion
  • Greg
    Greg over 6 years
    This was already checked for me and it is still not available
  • Greg
    Greg over 6 years
    This was already checked for me and it is still not available
  • mattyB
    mattyB about 6 years
    This answer, combined with @Slauma's answer here (stackoverflow.com/questions/11887833/…) fixed it for me.
  • Alex Shesterov
    Alex Shesterov almost 6 years
    downvote; This is almost a copy of this answer: stackoverflow.com/a/49677481/2170192 ; what's the point?!
  • momo
    momo almost 6 years
    Note: The "ADO.NET Entity Data Model" option will not appear on a SharedProject
  • Anthony Horne
    Anthony Horne over 5 years
    This answer, combined with stackoverflow.com/a/21074053/1662973 fixed it for me. Nuget + EF.
  • RezaNikfal
    RezaNikfal over 5 years
    This may help you.
  • Somnium
    Somnium over 5 years
    It was already checked for me and didn't work. However, when I created project "Class Library (.NET Framework)" project instead of "Class Library (.NET Standard)" - ADO option appeared.
  • Srinivas
    Srinivas almost 5 years
    Worked, Thanks.
  • Amir Dashti
    Amir Dashti almost 4 years
    Thanks for the hint, actually looking at the link that you have provided, this worked: Step 1: Install-Package Microsoft.EntityFrameworkCore.SqlServer Step 2: Scaffold-DbContext 'Data Source=.\SQLEXPRESS;Initial Catalog=DB;Integrated Security=True;MultipleActiveResultSets=True' Microsoft.EntityFrameworkCore.SqlServer
  • Karthic G
    Karthic G almost 3 years
    ok, when I additionally checked this and modified VS and it worked for me. It could have worked due to reinstallation with the selected component.
  • Karthic G
    Karthic G almost 3 years
    I have modified the answer accordingly , reinstallation worked for me which could have repaired the required components as you mentioned
  • Gert Arnold
    Gert Arnold over 2 years
    This is a question, not an answer. Please use comments for that.
  • Gert Arnold
    Gert Arnold over 2 years
    And you just copied this answer. And this and this
  • CincyBella
    CincyBella over 2 years
    This is the right answer! We should add a project using Class Library (.NET Framework)
  • Jamie
    Jamie over 2 years
    Thanks, I had forgotten that the .NET desktop development had not been checked off previously.