posted by: Ralf Rottmann | posted @ Wednesday, November 21, 2007 2:27 AM | View blog reactions

A few minutes ago I posted an article about an issue with the installer of the current ADO.NET Entity Framework version not running with the latest Visual Studio 2008 RTM.

Because I absolutely adore the Entity Framework and the work the ADO.NET team has done, I felt quite disappointed and for a few moments contemplated "downgrading" back to VS 2008 Beta 2. However, I found an easier way which involves a slight "hack" of the ADO.NET Entity Framework installer. Please note that I'm not taking any responsibility as to whether the hack works for anybody other than me or any potential side effect. Also this is very likely not a Microsoft supported hack (if there are any...).

All I can tell is that it has worked for me and for now I can use the Entity Framework with VS 2008 RTM on my machine without any issues.

Here's what I've done:

1. Locate the EFSetup-x86.exe. Use any archive software to unpack it. I used 7-Zip. This gives you the following files:

image

2. Open dp_entityframework.msi with any capable (hex) editor. I've simply used Notepad++.

3. Now search for the term "Beta2" (Note: There is NO space in front of the 2). In case you've opened the file with Notepad++ you'll find the search string in line 1155ff. If you're searching from the top, there are two hits for "Beta2" in the file which you have to skip. The third one is the one we go for. Here's how the line looks like:

code

(DP_NETFX35_INSTALLED_VERSION >= "3.5.20619.00") and (DP_NETFX35_INSTALLED_VERSION <= "3.5.20801.00")

 

4. This is where the installer checks for the existence of a specific version (range of versions) of the .NET Framework. I've carefully changed the line to the following:

code

(DP_NETFX35_INSTALLED_VERSION >= "3.5.00000.00") and (DP_NETFX35_INSTALLED_VERSION <= "3.5.90000.00")

 

So I simply replaced "3.5.20619.00" with "3.5.00000.00" and "3.5.20801.00" with "3.5.90000.00". Please note that the line breaks in the code boxes above are caused by the layout of my blog and you must not add any line breaks. Be careful to not alter the length or size of the file, simply change the numbers as described above digit by digit.

5. You're done. The installer will now seamlessly run with the RTM version of the 3.5 Framework and Visual Studio 2008 will work nicely with the Entity Framework Beta 2 drop!

 

Once a new version of the Entity Framework gets published, you should easily be able to uninstall this hacked one through the "Programs and Features" control panel application, as it gets nicely listed there:

image

Unfortunately I did not yet find a way to make it work with the Entity Framework Tools CTP 1. (UPDATE: Thanks to a reader's comment, please read this workaround!) I had these installed for the VS 2008 Beta 2 version and as far as I can tell, everything works just fine on my machine now, including the tools, which I've not been able to (re-)install. Chances are that once I've managed to install the Entity Framework itself via the hack described above, VS 2008 RTM simply picked up the DLLs which have been left behind even with me uninstalling the Entity Framework during the process of removing VS 2008 Beta 2.

 

comments
Vikwam stated:
# re: install entity framework on visual studio 2008 rtm
Hi!-
Thank's a lot of! This help us. Note! Be sure that your Notepad++ saving settings is set 'Assemply' and encoding is 'UTF-8'. This works!
posted on 11/22/2007 3:48 PM
Ralf stated:
# re: install entity framework on visual studio 2008 rtm
@Vikwam: My Notepad++ automatically activated the correct encoding once I opened a binary stream. Thanks for the hint, anyway!
posted on 11/22/2007 5:14 PM
James Story stated:
# re: install entity framework on visual studio 2008 rtm
Cheers for the tip! Worked a treat - as for getting the tools installed I went and grabbed Orca (the msi editing tool - get it from here: http://blogs.msdn.com/astebner/archive/2004/07/12/180792.aspx), unzipped the tools download and edited the msi. The changes to make are to the signatures table - change the DP_VS90DEVENV_FileSearch rows MaxVersion value to 9.0.21022.8 (the RTM devenv version number). Then run the msi and the tools should install :-)

The only problem I have found is the tools "Reverse engineer from database" option doesnt want to work (for me anyway) - everything else appears to be fine :-)
posted on 11/23/2007 2:11 AM
Vikwam stated:
# re: install entity framework on visual studio 2008 rtm
Hi-
Any helps for EntityDataModel wizard. When I start New Connection in wizard it's going down totally. What's wrong?
I installed Orca and changed signatures table and tools are installed also.
posted on 11/26/2007 2:41 PM
Nina stated:
# re: install entity framework on visual studio 2008 rtm
Installation was no problem at all with your tips to go by, however now I've got the same problem with the connection dialog disappearing after clicking "New connection". I neither had the entity framework, nor the toots installed on the beta 2.
Anybody else got a way around this?
posted on 11/27/2007 12:06 AM
Ralf stated:
# re: install entity framework on visual studio 2008 rtm
Thanks for your comments!

The tools _partially_ work on my system. As stated in the article, this is a pretty dirty workaround with no guarantees whatsoever. I used it primarily to make some of the demos I planned for upcomming speaches work - with VS 2008 RTM.

I desperately wait for the updated version of the Entity Framework and Tools and will keep you posted!
posted on 11/27/2007 12:15 AM
Remco stated:
# re: install entity framework on visual studio 2008 rtm
Thanks a lot! I was really looking for this!
posted on 12/6/2007 10:45 AM
ma736zda stated:
# t509a
t487t
posted on 8/23/2008 2:52 PM
ma846zda stated:
# t844a
t853t
posted on 8/23/2008 3:32 PM
ma790zda stated:
# t878a
t804t
posted on 8/23/2008 6:45 PM
post your comment
Title *
Name *
Email
Url
Comment *  
Please add 6 and 5 and type the answer here: