views:

29

answers:

1

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!

A: 

I have been in touch with a few people at Microsoft, and have some very interesting information.

My OS is: v6.1.7600.16384 The RTM build for Win7 is: 6.1.7600.16385

I'm running a pre-RTM build of Win7. On Windows 7, mscoree.dll is updated by an OS Update that is chain installed by the .NET 4 installer. According to the people I've been talking to: "The OS update actually explicitly targets the RTM version of Windows 7 and will be built into all the future SP’s. It returns a “not applicable” return value to our installer which is intended to mean that the update is already applied or built into the operating system. That’s why the .NET installer succeeded."

So, it looks like upgrading to the RTM build will solve this issue.

dreadpirateryan