Uninstalling the .NET Framework 4.5RC can be a real mess, let me explain…
I had a perfectly functional VM on which I tried to install the 4.5RC version of the .NET framework to test out some of the new features of EF. Since what I wanted to test didn’t work and since I THOUGHT 4.5 and 4 where side by side, I decided to go back to simply 4 and uninstall the 4.5RC from the VM. Big mistake…. Now my Visual Studio would not work at all and kept saying “Unknown Error” when I started it… After further investigation, I saw this post and as you can see in here http://msdn.microsoft.com/en-us/library/5a4x27ek(v=vs.110).aspx
when you uninstall the 4.5 framework it automatically uninstalls the 4.0 framework and ANYTHING related to it! D’oh !!!
I re-installed the 4.0 framework and SP1 and now Visual Studio 2010 started working again. But I wasn’t done fixing issues yet… My application was using EF4 and ODP.NET and now, when I open up the EDMX I would see the following error:
error 175 the specified store provider cannot be found in the configuration or is not valid
I was quite annoyed by this so I decided to simply try to regenerate a new EDMX file from database… but I couldn’t !!! In the drop down box where you choose your provider for the EF connection, Oracle ODP.NET had disappeared !!!! *me throws holy water all around* !!! After much digging around, I found out that the MACHINE.CONFIG file had been modified by the uninstall process and that a very important line had been removed…
If you have this error and you use EF with a particular provider other than SQL Server, check out your machine.config file and see if this section contains the reference to your provider:
Mine needed to look like this:
<add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=220.127.116.11, Culture=neutral, PublicKeyToken=89b483f429c47342" />
Restart your VS and your original EDMX will not complain about error 175 anymore…
But that wasn’t all, I ended up re-installing ODP.NET because my machine.config file was really messed up and missed many entries it previously had… So a word of wisdom (which I didn’t follow, stupid me) is take a snapshot of your VMs before “trying out” 4.5RC and maybe uninstall it later or backup your PC….
Hope this saves you some time…