Missing "Ado.Net Entity Data Model" on Visual Studio 2013 - visual-studio

I have created new web project but I can't find ADO.net Entity DAta Model to add it.
How to fix it or Install it ?

Go to "C:\ProgramData\Package Cache" and search for "EFTools.msi".
You should find two files, just install the most recent one (it should be about 960KB). This fixed the problem for me.

i have the same problem, but there is no "EFTools.msi" in "C:\ProgramData\Package Cache" for me...
UPDATE :
i download and install "Entity Framework 6 Tools for Visual Studio 2012 & 2013" and it solved the problem \m/
Download Link

Some web tutorials show a 'ADO.NET data entity model' item in the 'Models->Add' menu. In VS2015 this menu item is not shown. You need to keep drilling down by selecting 'New Item...' and then further selecting 'Data' from the pop-up dialog.

My solution was none like the above.
The .msi file was nowhere in the folders suggested in prior answers, nor doing a search in my hard drive found any EFTools.msi instances.
So the failsafe approach came through this article (since the author appears to have completely removed the page from the server, I've changed the URL to a version of the page stored in Google's cache), which was poorly written by a chinese fella, so I'm gonna try to rewrite the steps in a clearer way:
The solution is as follows:
Open your VS2013 installation ISO (or pop the DVD in) and navigate to "\packages\EFTools" folder;
There you will find 2 files (a .cab file and a .msi file);
Copy both files to a directory on your hard drive;
[Optional]: You can create in that same directory, an empty .txt file ("Log.txt") so that the installation log output will be redirected to it later;
Open a MS-DOS command prompt (with administrative rights) and type the command: EFTools.msi USING_EXUIH=1 /log "Log.txt" [NOTE: If you did not perform step #4, then you do not need to type from the ' /log' on (inclusive)]
Wait patiently while the installation process finishes. Takes quite some time (guess never hurts to remind you that this needs to be done with VS2013 closed). The installation should go fine, anything weird will be logged into the text file (the one you created in step #4).
Or, you might just double-click the .msi file if you are feeling brave..
After installation, open VS2013 and try adding a new item to the Models folder. The "ADO.NET Entity Data Model" should have reappeared under the "Data" tab.
Recognition goes to the anonymous chinese poster on that link (er, "Melinda"?) - xiè-xiè!

Be sure you are trying to do that in .Net Framework project. For example, when you are creating a project do not use a template called Windows Forms App (.Net Core), use Windows Forms (.Net Framework). The (.Net Framework) extension is important.

right click on your project--> properties---> framework target select 4.5 and should work.

It's only for Visual Studio 2012. For me this had no effect on 2013.

For the record, if you have Visual Studio 2015 RC, the "EFTools.msi" can't be downloaded from Microsoft
If you accidentally delete the "ProgramData" folder, the Repair option will not work, you have to use the Add or Remove features option from the installer, and check the SQL Server Data Tools

Make sure the type of project you've added is for .NET Framework and not for .NET Standard. The templates for adding things such as ADO.NET Entity Data Model are included for .NET Framework.

For Visual Studio 2017 the following works.
Create project:
Create new project of type 'Class Library'
Install 'Entity Framework' from NuGet
Now add datamodel:
In project click 'Add New Item'
Select 'Visual C# Items' -> 'ADO.NET Entity Data Model'

I recently added Entity Framework and installed in one of my many projects in a single sln file.
The thing is Entity Framework works on Framework higher than 3.5.
So Class Library of NET Standard wouldn't support Entity Framework, thus missing Ado.Net Entity Data Model, Since NET Standard console Library is Framework 2.0, changing the class Library to .NET Framework one, will include Ado.Net Entity Data Model.

I had the same issue, but found out that I was selecting ASP.NET Core web App, ASP.NET Core web App(MVC) etc, Instead Choose ASP.NET Web Application (.NET Framework) and you will get the ADO.NET Entity Data Model option.

Go to visual studio installer.
Add:
Entity framework tool 6
Download and install it.

Related

Entity Framework not appearing in Add New Item list in Visual Studio 2017

I created a new MVC project in Visual Studio 2017. I wanted to add an EDMX file (I will be doing database-first) so right clicked on the project and selected Add|New Item.
However, I cannot find the Entity Framework components that were available in the previous versions of Visual Studio. Does anyone know where they went?
I had a similar issue today after i updated my VS to the latest 2017 version. I tried to open an .edmx file in VS2017 and it didn't show the designer view. So i realised i forgot to select Entity Framework tools during the installation:
Everything is back to normal :)
In .NET Framework-based projects, the Entity Framework 6 templates are still there. However, for .NET Core-based projects, I believe you're expected to use the dotnet ef commands. This includes a means of scaffolding a code-first DbContext from an existing database. See ASP.NET Core - Existing Database.
To verify this, I setup a demo project with the following structure:
The New Item/Data dialog for the .NET Framework project:
Note that there is also an EF POCO Generator template available in the Online templates section that may be of interest to you:
I know this is late, but I ran into the same exact issue. After reading some of the other answers, I realized I had created a .Net project with Standard library instead of the Framework library.
I faced this issue, while creating an MVC application on my latest installation of VS2017.
Failed:
Tried installing Entity Framework using Nuget package manager[Install-Package EntityFramework], but failed to show Ado.NET Entity data model
Success:
1. open programs under control panel and select Visual Studio 2017
2. select Change the installation
3. Select Modify installation
4. Select Individual components
5. If SQL server data tools already installed, deselect/uninstall this component and reinstall the same again.
6. uninstall and reinstall SQL Server Data tools
Note: with one component change, other components may also be deleted. You have to recheck while reinstalling

Cannot add view to ASP.NET MVC 5 project

I'm trying to add a view to an ASP.NET MVC 5 project in Visual Studio 2013, but the Add button is greyed out.
The default installation of Visual Studio was missing some required elements. When I chose ASP.NET and web development, the following options were not selected on the right side of the page.
.NET Framework project and item templates
NET Framework 4.6.2-4.7.1 development tools
Additional Project templates (previous versions)
.NET WebAssembly build tools
(I found this on the Microsoft web site Microsoft Developer Resources (in spanish!)
I got this for ages, all I did was upgrade the nuget packages for Mvc and it fixed it. I suspect that I had a mismatch of versions in the solution.
Update-Package Microsoft.AspNet.Mvc -Version 5.2.3
The version part is optional, but it should mean that all projects get the same version.
You should create a controller first, then it will create a View folder automatically. Try to right click that file then click create new view. Also Copy might be a specific name, you may need to change that name.
Different from the OP issue (as I'm on VS2017) but in case anyone else comes to this question when they've made the same (basic) error as me...
It took me a few minutes to realise that if you type in a new Model class (as seen below) then this is not what the UI wants; it requires you to select an existing Model from the dropdown. Once I created the model and then selected it 'Add' was enabled.

How to find dbcontext template in Visual Studio 11

I'm using database first approach to create a model with entity framework. In VS2010 after the model was generated I always choose a different code generation template (right click on diagram "Add new code generation item") then, in the dialog box, choose "DbContext Generator". This will instruct VS to generate POCO classes instead of the, very complex, standard class. When I tried to do the same in the Visual Studio 11 Developer Preview I can't find the template "DbContext Generator" in the dialog.
How can I add the dbcontext template to the Visual Studio 11 Developer Preview?
I saw I can use nuget but I'm unable find it when I do a search.
Can you add the Entity Framework Power Tools via the Extension Manager? Then in a class library, you can right-click and "Reverse Engineer Code First". That will pull your database in and create everything you need (no need for EDMX and TT files). You will need to have EF 4.1 installed or have added the EntityFramework NuGet package to your project before running reverse engineer.
I don't have VS 11 installed here, so can't check if the tools will install (I'm also not sure whether these features are being rolled into 11) but anyway will work great in 2010 as I frequently use it.
Richard
In February Microsoft release a dbContext Generator that works on Visual Studio 11 Beta.
The link to download this generator is:
http://visualstudiogallery.msdn.microsoft.com/da740968-02f9-42a9-9ee4-1a9a06d896a2?SRC=VSIDE
Hope it helps.

After migrating a VS 2005 project to VS 2010, I have web references causing troubles

I have a winform project build on VS 2005 and framework 2. Recently, we moved to VS 2010, but keeping the framework v2 as target.
Everything runs fine except my web references.
When I update the web references, a new file "Reference1.cs" is created, under the reference.map file. This is causing troubles as original "Reference.cs" is still here and all classes are duplicated.
Here is the project structure :
My winform project
Web references
MyWebServiceReference
WebService.disco
webservice.wsdl
Reference.map
mycomplextype.datasource
Reference.cs
Reference1.cs
On the reference.map file, I have a custom tool defined : MSDiscoCodeGenerator. This custom tool seems to throw a warning :
Warning 1 A custom tool 'MSDiscoCodeGenerator' is associated with file 'Web References\MyWebService\Reference.map', but the output of the custom tool was not found in the project. You may try re-running the custom tool by right-clicking on the file in the Solution Explorer and choosing Run Custom Tool.
If I run the custom tool, the file reference1.cs is generated...
thanks in advance for the help.
I would try deleting the web reference and re-adding instead of updating.

I cannot find template ADO.NET Entity Data Model in VS2010

In VS2010, I cannot find the template ADO.NET Entity Data Model from the Data section.
I was doing:
create a silverlight(version 4th) project with a WebSite
right click the web project, Add -> New Item -> Data Section(actually, I tried every one)
But I cannot find it!! It's weird!
Then,
I tried to reset my VS template, it didn't work
Tried to re-install VS2010, and I got the "Successful" message. also I am sure that the ADO.NET Entity Framework has been installed appropriately.
So, is there anything else I can do? can I just install this template to VS?
i believe you can add a ADO.NET Entity Data Model in a windows class library
and reference that library where it is required. but you cannot add the data model in a silverlight library.
Update:
in that case, i presuming the website is atleast targeting version 3.5 of the framework
for vs2010, you can check that the required template is available at the locations below
'%programfiles%\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\Data\1033\AdoNetEntityDataModelCSharp.zip'
'%programfiles%\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\VisualBasic\Data\1033\AdoNetEntityDataModelVB.zip'
'%programfiles%\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\Web\CSharp\1033\AdoNetEntityDataModelCSharp_ASPNET.zip'
'%programfiles%\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\Web\VisualBasic\1033\AdoNetEntityDataModelVB_ASPNET.zip'
(in a x64 environment use 'Program Files (x86)' for %programfiles%)
hope that helps.
-ryan

Resources