How to use Entity Framework Power Tools in Visual Studio 2015?
I have used Entity Framework in Visual Studio 2012. Build entity model by "reverse engineer code first".
But when I setup Visual Studio 2015 just now, and setup EF power tools by NuGet, I can not find "reverse engineer code first" option.
Anyone knows what i should do?
Thanks!
Entity Framework Power Tools is a Visual Studio extension, so you need to install it first. But, there is a problem, the supported versions of Visual Studio are 2010, 2012 and 2013. Visual Studio 2015 is in Preview Version. I think that's why it is not included yet. But I have a solution that works for me in case like this.
- Download Entity Framework Power Tools
- The .vsix file is a zip, so you can unzip it using Winrar (or any other program with this functions). Unzip only the file named extension.vsixmanifest
-
In this file (it's a xml) you need to find a tag named SupportedProducts and add the Visual Studio 2015 version (go to Help->About Microsoft Visual Studio to check what edition you have installed) .
<SupportedProducts> ... <VisualStudio Version="14.0"> <Edition>Ultimate</Edition> <Edition>Community</Edition> </VisualStudio> </SupportedProducts>
Overwrite the extension.vsixmanifest file in the .vsix, and try to install that.
Hope this help
Update 1
I tried with that configuration (Version:14.0 and Edition:Ultimate) and It worked.To save time, you can download it in this link. I also added the Community edition.
Update 2
Julie Lerman wrote an article in her blog about how to solve this issue as well.
Update 3
I strongly recommend to use EntityFramework Reverse POCO Generator when you are working with legacy databases. If your schema could change several times not using migrations, then is preferable to have t4 template which can help you to re-generate the model every time the DB is updated. The only you need to do is right click on your .tt file and execute Run Custom Tool option, that's all. EF Power Tools also has an option that allows you to customize the t4 template.
Now that VS 2015 is released, you will want to use EntityFramework Reverse POCO Generator https://visualstudiogallery.msdn.microsoft.com/ee4fcff9-0c4c-4179-afd9-7a2fb90f5838. ALthough the instructions are a little involved, the tweaks/workarounds mentioned above are no longer needed, and it works great.