How to remove EF 4.2 and reset my Visual studio - entity-framework

I installed a lot of ado.net entity framework versions and tools. one of them was this one: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=26660
Now there are a lot of problems while trying to add a new entity data model, and also can't use any code generation tools such as dbcontext code generator.
What I want to know is how to remove all of these ef versions and reset my Visual studio 10.
Note, I repaired my vs, and reinstalled the SP1 but with no hope, the same errors are there.
here are 2 screen shots that may let you help me better:
installed items in my VS:
error appear after trying to add a new entity data model:

The uninstallation procedure of EF June 2011 CTP is described in this article. As you see in your linked download page there is red text in instructions describing issues with CTP. That CTP should have never been installed on your main development (production) machine because it breaks existing VS functionalities. The instructions directly says that it should be installed in non-production environment (for example virtual machine).

Related

Visual Studio Ultimate 2013 crashes when using Entity Framework Power Tools Beta 4

I'm running VS Ultimate 2013 on a Windows 8.1 machine and have been successfully for several months now. However, I just installed the NuGet package for Entity Framework Power Tools Beta 4 today and am having issues. After installing EFPT, I restarted VS, loaded my solution, made my "data" project the startup project, right-clicked on my class deriving from DbContext -> Entity Framework -> Generate Views. Visual Studio completely crashes and restarts. I've tried clicking on other options in in the EFPT context menu such as "View Entity Data Model (read-only)" and all of them results in VS completely crashing and restarting.
I was running VS with Update 3, so I installed Update 4 and still the same issue. It does NOT crash if running devenv.exe in safemode, but EFPT doesn't actually DO anything either.
So now, I'm running VS version 12.0.31101.00 Update 4 with .NET Fx 4.5.51641 and Entity Framework 6.1.2.
Ultimately, I'm trying to create a EDM mapping file for my code-first EF context to cache and reduce startup time. If this issue I'm having is a known issue, is there a fix OR a workaround in generating this mapping???
Thank you Erik. I wanted to answer my own question because I was able to take it a step further. Rather than writing (a LOT) of code to generate cached views and having to run it every time your code changes.
A dev on the SignalR team at Microsoft, Pawel Kadluczka, wrote a nice and EASY-TO-USE bit of code that can be installed via NuGet. The "Interactive Pre-Generated Views" project, when added to your data assembly, will look for cached views and if not found, generate them on the fly. Out of the box, it supports both file and db cached view info.
The only bit of code I had to add to utilize this was:
static DynamicDbContext()
{
InteractiveViews.SetViewCacheFactory(new DynamicDbContext(), new FileViewCacheFactory(_SCRIPT_DIRECTORY + "dbviews.xml"));
}
It literally took me 5 minutes to install, write the bit of code, execute and confirm.
It needs to run prior to any query being executed with your dbcontext and so he recommends this bit of code to be placed in a static ctor of your custom dbContext.
Pawel's blog post where he describes it is: http://blog.3d-logic.com/2013/12/14/using-pre-generated-views-without-having-to-pre-generate-views-ef6/
You can install via NuGet or read more about it on CodePlex: https://efinteractiveviews.codeplex.com/

How best create a visual model of EF Code First after VS2013 Update 2?

I know the EF Power Tools offers this but am loath to install them after installing VS2013 Update 2 since some of the Power Tool features are now part of Update 2. I already spent a good part of yesterday reinstalling VS2013 w/ integrated Update 2 after installing/uninstalling EF 6.1.0 Tools broke using the ADO.NET project templates. Is there anything built into Update 2 that allows this?
Honestly, the quickest way is usually by generating a database diagram via SQL Server Management Studio. Assuming the database has been generated, and your question is meant purely as a visual representation of the model.

Entity Framework Power Tools does not appear in VS 2012

I have installed EntityFramework 6.01 and have added a reference to my project. I closed Visual Studio 2012 and I then installed EF Power Tools Beta 4.
I re-opened Visual Studio 2012 and right-clicked my project containing dbContext. No entry appears in the context menu for Entity Framework. No error messages occurred during installation.
Are there additional pre-requisites to using EF Power Tools?
I think I have discovered the solution. My company uses VB.net as the standard development language. As a test, I started a C# project. Entity Framework Power Tools are fully present in the C# project. It appears that Entity Framework Power Tools are not yet available in VB.net projects.
Try right clicking on the project. I just looked at the beta 4 description and it does not reference EF 6. But the reverse engineer classes from database should show up with a right click on the project, indicating that at least the power tools installed correctly. These are the only comparability issues I could find:
Generate Views won’t work with prerelease versions of EF6.
It will, however, work with the RTM version when it’s released.
View Entity Data Model won’t work with EF6 on Visual Studio 2010.
Beta 4 updates the Power Tools to work with Entity Framework 6 and Visual Studio 2013. The following issues have also been fixed in this release.
Power Tools don't work when project is under a solution folder
Power Tools stop working when EF.dll is loaded into VS
Specific info found on the ado.net blog on msdn

Entity framework starter kit on VS 2012

I have downloaded and installed the Entity Designer Starter Kit on both VS 2010 and 2012. I've created a project and have customized that project to allow me to add (for now) three attributes for each field value: See Below: (I'd post the image but I've only started posting here and I don't have 10 points) :(
As you can't see above, the Extension is working...on VS 2010, however, we need to use VS 2012 - so we can have the new support for geography fields in our Model, but it doesn't seem to work in VS 2012. The extension shows up as an installed extension in the Extension Manager in both versions, but doesn't work (or do anything in 2012.) when we build a new Model or open an existing one. :(
I've looked at the manifest for versioning info, and it DOES show up in the Extension Manager as having been installed (in both versions). (See part of Manifest below -- We are using the Professional version of 2012)
<SupportedProducts>
<VisualStudio Version="11.0">
<Edition>VSTS</Edition>
<Edition>VSTD</Edition>
<Edition>Pro</Edition>
<Edition>Express_All</Edition>
</VisualStudio>
<VisualStudio Version="10.0">
<Edition>VSTS</Edition>
<Edition>VSTD</Edition>
<Edition>Pro</Edition>
<Edition>Express_All</Edition>
</VisualStudio>
</SupportedProducts>
Does anyone have any idea why its not running in 2012?
Thanks for any help!!!!!!!
bob
Back in 2010 I found that the Starter Kit did not work, perhaps due to the version being for VS2010 RC.
So I rebuilt it, and today, I've just upgraded it to VS2012.
So you can get it from my Blog.
All I did was run it though the VS upgrade wizard, and then change the manifest to VS2012 and it worked fine. Perhaps you could explain a little more "geography fields", as I've not read up yet on any of the changes in VS2012.
http://www.jsrsoft.co.uk/blog/post/Entity-Framework-Starter-Kit-alternative

Entity Framework Power Tools error when using Reverse Engineer Code First

I have a Sql Server 2012 database that I am trying to generate the Code First POCOs/Mappings in Visual Studio 2012 SP1 using the Reverse Engineer Code First option of EF Power Tools 2.
After setting the connection properties, the following error is generated. I have researched the web but with no luck on how to resolve this. Any help would be appreciated.
Compiling transformation: The type or namespace name
'EfTextTemplateHost' could not be found (are you missing a using
directive or an assembly reference?)
EDIT:
EF Power Tools Beta 3 shipped today and the issue should be now fixed
You will see this exception if you try using EF Power Tools after installing VS 2012 Update1. Rowan's response on EF Team blog (in the comments, towards the bottom of the page) reads:
As a workaround to this issue you can edit Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes\EF.Utility.CS.ttinclude and remove the first line (<## CleanupBehavior Processor="T4VSHost" CleanupAfterProcessingTemplate="true" #>).
The only side effect of doing this is that the EF Designer will use more virtual memory when you create and edit models. On most computers this isn't a problem.
We are working on shipping a new version of EF Power Tools which will include a fix for this problem.
EDIT:
Rowan's blog contains more details on how to manually work around the issue if you still hitting it even though you have Power Tools Beta 3 installed.
Try to use this plugin
https://skydrive.live.com/?cid=456117cf53a42144&id=456117CF53A42144%21388
(however it's not signed)
Someone complained # MSDN that Power tools is screwed (actually whole EF is a mess).
After you install this one, when VS prompts you for database information click on "Advanced" and set Persist Security Info to True.
Should work
EF still got a crapload of bugs, avoid using it for critical environments. Don't even think about EF5.