none
Windows 7 destroys .NET 4.0 config

    Question

  • I discovered today that the Windows 7 RTM upgrade install option causes major problems if you have .NET 4.0 Beta 1 installed.  It prevents any .NET application that doesn't have the <requiredRuntime> element in its .exe.config file from running.  The kind of problems I saw:

    - Can no longer compile C++/CLI programs, error C1108, "alink.dll" not found
    - Trying to repair Visual Studio causes an endless chain of prompts showing error 2908
    - Trying to reinstall .NET 3.5 SP1 fails with a silent crash

    My advice: be sure to uninstall VS2010 and .NET 4.0 Beta 1 before installing Windows 7.

    I could have used that advice.  I narrowed the problem down to the LoadLibraryShim() entry point in mscoree.dll failing with a file-not-found error.  Without it being able to load fusion.dll, a .NET program will quickly die.  I did discover a workaround.  Uninstalling VS2010 didn't solve the problem, re-installing .NET 4.0 did.  I'm afraid I'm now stuck with this beta forever, definitely contemplating installing Win7 from scratch.  If only I had two days.
    Hans Passant.
    Saturday, August 08, 2009 2:04 PM

Answers

  • Here are some simpler steps that should get you back in a working state. The following commands should prevent you from needing to do a bunch of steps.

    From an admin command prompt run the following commands in order depending on whether you are on 32 bit or 64bit:

    For x86 OS:
    cmd /c "msiexec /x {19BD09BF-3BBD-3663-A5ED-50B6B2B07E42} /qb"
    cmd /c "msiexec /x {1DF6A8F6-5048-323F-8758-DA533CE0F07E} /qb"

    For amd64 OS:
    cmd /c "msiexec /x {175D5555-EE49-3033-99AF-BC1E206223FD} /qb"
    cmd /c "msiexec /x {13B27C82-19BA-3494-9420-F932B40673CA} /qb"

    These commands will remove the Beta1 4.0 Framework from your machine the same way it would have through Add/Remove Programs.

    This gets you into a state where running repair on VS2010 from Add/Remove programs should put the 4.0 framework back on the machine and fix up your VS install.

    Note, these steps should only be performed if you upgraded your OS, doing this in other scenarios to try and uninstall beta1 may leave you in worse shape. Also, you may need to download VS2010 again in order to repair.




    P
    Monday, August 10, 2009 5:24 PM
  • Must say, Microsoft should elevate this warning to be a  tad more visible - like on a prominant page on the MSDN developer site. Like many before (and many to follow) I only learn't of this problem only after perfoming the upgrade (for me that was a "supported" upgrade path - from vista pro to Windows 7 RTM Ultimate).

    As for me, Peter's couple of uninstall commands alone did not remedy the situation - I still got the VS 2010 2908 error. What did work was a combination of both, Peter's 2 commands and some of Duckboy's steps. I feel you pain Duckboy, and thanks for posting your solution.

    So, for me I did the following: (the reboots between each stage may not be neccessary, but hey,  its Windows)
     1) For amd64 OS:
                cmd /c "msiexec /x {175D5555-EE49-3033-99AF-BC1E206223FD} /qb"
                cmd /c "msiexec /x {13B27C82-19BA-3494-9420-F932B40673CA} /qb"
     2) reboot
     3) Uninstall Visual Studio 2010 and its redistributables
     4) reboot
     5) Install .NET 4.0 (I used the link from NoBugz post)
     6) you guessed it - another reboot
     7) Install Visual 2010
     8) I didn't reboot this time :)

    -- 
    Don(C)
    Friday, August 14, 2009 1:56 AM

All replies

  • I'm sorry you hit this. I blogged about this problem and tried to warn folks, but yes, .NET Beta 1 wasn't able to survive the upgrade. Beta 2 won't have this problem. 

    Details on how to uninstall are on my blog
    • Proposed as answer by Forum Tuesday, December 08, 2009 7:58 AM
    • Unproposed as answer by nobugzMVP, Moderator Tuesday, December 08, 2009 11:55 PM
    Saturday, August 08, 2009 4:06 PM
  • Your blog post missed my attention span by about 2 hours.  I suppose that makes it my problem.  Well, I dealt with it, I posted my misery in this forum and documented a workaround.  What did you do again?  Wipe everything?  Dog-food this stuff.  Please.  You work for the Company now.

    Hans Passant.
    Sunday, August 09, 2009 12:08 AM
  • Fix! If you already upgraded to Win7 RTM from Vista or a pre-release Win7 installation, and didn't uninstall VS2010 and .NET Framework 4.0 before doing so, you can follow the steps below to repair your system and avoid having to re-pave. [Note: a clean install is still recommended, but the following worked for me.]

    It's not VS2010 itself that's the problem here, but the fact that Win7 upgrade (from Vista or from Win7 beta or RC) isn't aware of .NET 4.0 beta, so it doesn't transfer it over to the new Windows directory, even though references to it are still in the registry after upgrade.

    Without spending hours hand-editing the registry, the all-GUI solution is as follows:
    1. Uninstall VS2010, ignoring / continuing on any errors - if this doesn't work, continue with step 2 and try again in step 8, below
    2. Download *both* .NET 4.0 Beta 1 "full" framework and "Client Profile", if you haven't already
    3. Using 7-Zip (or anything else that can extract content files from an .EXE installer file), extract the files from both the client and full framework installers to separate temporary directories (right-click on the .EXE file -> 7-Zip -> "Open Archive", then find and extract the installation files from the weird ./././. path inside the installer archive)
    4. Run the "full" framework installer .EXE and select "Repair"
    5. When prompted for the MSI files, give it the appropriate temp directory location from step 3, above
    6. You *may* have to do steps 4 & 5 twice - for me, the first run repaired the client profile and barfed on the full framework, but the second run successfully repaired the full framework
    7. REBOOT!
    8. If VS2010 wasn't uninstalled in step 1 above, uninstall it now (or, if you're *really* brave, try running it - it may just work!)
    9. Uninstall VC++ 2010 runtimes (x86 and/or x64) from Control Panel / Programs
    10. Uninstall .NET Framework full from Control Panel / Programs
    11. Uninstall .NET Framework Client Profile from Control Panel / Programs
    12. REBOOT!
    13. VS2010 should now install cleanly, with an auto-reboot after installing .NET 4.0 Framework
    Lucky 13 steps :) Worked for me; hope it works for you!

    Philip the Duck
    Sunday, August 09, 2009 10:55 PM
  • Here are some simpler steps that should get you back in a working state. The following commands should prevent you from needing to do a bunch of steps.

    From an admin command prompt run the following commands in order depending on whether you are on 32 bit or 64bit:

    For x86 OS:
    cmd /c "msiexec /x {19BD09BF-3BBD-3663-A5ED-50B6B2B07E42} /qb"
    cmd /c "msiexec /x {1DF6A8F6-5048-323F-8758-DA533CE0F07E} /qb"

    For amd64 OS:
    cmd /c "msiexec /x {175D5555-EE49-3033-99AF-BC1E206223FD} /qb"
    cmd /c "msiexec /x {13B27C82-19BA-3494-9420-F932B40673CA} /qb"

    These commands will remove the Beta1 4.0 Framework from your machine the same way it would have through Add/Remove Programs.

    This gets you into a state where running repair on VS2010 from Add/Remove programs should put the 4.0 framework back on the machine and fix up your VS install.

    Note, these steps should only be performed if you upgraded your OS, doing this in other scenarios to try and uninstall beta1 may leave you in worse shape. Also, you may need to download VS2010 again in order to repair.




    P
    Monday, August 10, 2009 5:24 PM
  • Must say, Microsoft should elevate this warning to be a  tad more visible - like on a prominant page on the MSDN developer site. Like many before (and many to follow) I only learn't of this problem only after perfoming the upgrade (for me that was a "supported" upgrade path - from vista pro to Windows 7 RTM Ultimate).

    As for me, Peter's couple of uninstall commands alone did not remedy the situation - I still got the VS 2010 2908 error. What did work was a combination of both, Peter's 2 commands and some of Duckboy's steps. I feel you pain Duckboy, and thanks for posting your solution.

    So, for me I did the following: (the reboots between each stage may not be neccessary, but hey,  its Windows)
     1) For amd64 OS:
                cmd /c "msiexec /x {175D5555-EE49-3033-99AF-BC1E206223FD} /qb"
                cmd /c "msiexec /x {13B27C82-19BA-3494-9420-F932B40673CA} /qb"
     2) reboot
     3) Uninstall Visual Studio 2010 and its redistributables
     4) reboot
     5) Install .NET 4.0 (I used the link from NoBugz post)
     6) you guessed it - another reboot
     7) Install Visual 2010
     8) I didn't reboot this time :)

    -- 
    Don(C)
    Friday, August 14, 2009 1:56 AM
  • Thank you guys so much for putting this information together. Just wanted to say that the steps in dekc's post worked for me with no problems.

    Thanks, again!

    - Jeremy
    Tuesday, August 25, 2009 7:58 AM
  • This perfectly worked ,   the step says amd64 but also works for  intel X86
    Friday, August 28, 2009 6:27 AM