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:
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:
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.