I'm run into a really interesting .NET 4.0 installer issue. I have a small program that is targetting .NET 2.0. I'm running Win7 x64, which has .NET 3.5 pre-installed. After I install .NET 4.0, the program stops working. It's trying to use a function that was deprecated in .NET 4.0, but according to various articles I've read, the in-process side-by-side technology of .NET 4.0 should allow my program to continue running on the .NET 2.0 CLR.
It looks like the .NET 4 installer leaves my machine in a somewhat broken state, even though the installer finishes successfully. The version of mscoree.dll (the main .NET runtime dll) installed in both c:\windows\system32 and c:\windows\syswow64 was a 2.x version after installing .NET 4.0. I tried just copying the properly installed 4.0 mscoree.dlls from another machine that ran the exact same installer, and after that my program worked as it should.
I can’t pinpoint why this is happening, and why I can only reproduce it on one machine. Luckily I can reproduce the issue very reliably. Uninstalling .NET 4 also fixes the issue, but I'd like to be able to run my code successfully without suggesting that users not install .NET 4.0.
Any thoughts on why this might be happening? Thanks!