Repairing the .NET Framework 2.0 SP2 or 3.0 SP2 MSI from Add/Remove Programs does not work

Last week, I posted a set of command line parameters that can be used to repair or uninstall the .NET Framework 2.0 SP2 and 3.0 SP2.  When I was working on that blog post, I noticed a behavior change that is new in 2.0 SP2 setup and 3.0 SP2 setup that affects the repair scenarios for these products on Windows XP and Windows Server 2003, so I wanted to describe the issue and how to work around it.

Description of the issue

There was a change made in the MSI-based installers for the .NET Framework 2.0 SP2 and 3.0 SP2 that causes the default repair that happens when you use the Add/Remove Programs entry for these products to not actually repair anything.  For example, if you end up with an out-of-date version of c:\windows\system32\mscoree.dll or if any of the files or registry values in the .NET Framework 2.0 SP2 or 3.0 SP2 are missing entirely, the repair from Add/Remove Programs will not restore the files or registry keys.

Because this issue only affects the MSI-based installers for 2.0 SP2 and 3.0 SP2, you will only encounter this issue on Windows XP and Windows Server 2003.  On Windows Vista and Windows Server 2008, the .NET Framework 2.0 SP2 and 3.0 SP2 are installed as OS update packages instead of as MSIs.

How to work around the issue

If you need to repair the MSI-based version of the .NET Framework 2.0 SP2 or 3.0 SP2 on Windows XP or Windows Server 2003, you must run the following command lines instead of using the repair option from Add/Remove Programs:

.NET Framework 2.0 SP2 - silent repair

msiexec /fpecmsu {C09FB3CD-3D0C-3F2D-899A-6A1D67F2073F} REINSTALL=ALL /l*v %temp%\netfx20sp2_repair_log.txt /qb

.NET Framework 3.0 SP2 - silent repair

msiexec /fpecmsu {A3051CD0-2F64-3813-A88D-B8DCCDE8F8C7} REINSTALL=ALL /l*v %temp%\netfx30sp2_repair_log.txt /qb

Behind-the-scenes details if you are interested

There is a difference in the command line switches being passed in to trigger the repair of 2.0 SP2 and 3.0 SP2 compared to 2.0 SP1 and 3.0 SP1.  Here are a couple of specific examples:

.NET Framework 2.0 SP2 - silent repair

msiexec /fpecmsu {C09FB3CD-3D0C-3F2D-899A-6A1D67F2073F} REINSTALL=ALL /l*v %temp%\netfx20sp2_repair_log.txt /qn

.NET Framework 2.0 SP1 - silent repair

msiexec /i {B508B3F1-A24A-32C0-B310-85786919EF28} /l*v %temp%\netfx20sp1_repair_log.txt /qn

The reason that these command lines need to be different (aside from the product codes changing between SP1 and SP2) is that the REINSTALL=ALL property no longer gets set by default in the MSI-based .NET Framework 2.0 SP2 or 3.0 SP2 repair processes.  There is a custom action in .NET Framework 2.0 SP1, 2.0 SP2, 3.0 SP1 and 3.0 SP2 setup that sets the REINSTALL=ALL property during repair scenarios.  However, the condition for that custom action was changed in 2.0 SP2 and 3.0 SP2 setup such that it will never evaluate to true, and the REINSTALL=ALL property no longer gets automatically set.  As a result, you have to manually pass in the REINSTALL=ALL property in order to perform a full repair of the .NET Framework 2.0 SP2 and 3.0 SP2.

Comments (29)
  1. Steve Dodson says:

    Thank you for this posting. I had spent several hours trying to repair/uninstall/re-install .Net Framework 2.0 but was getting nowhere. The information you provided for the '.NET Framework 2.0 SP2 – silent repair' for Windows XP worked perfectly.

    It is interesting to note that my .NET Framework 2.0 SP2 became corrupt after installing a Microsoft Update . . .

  2. James says:

    You are my new Online Hero.. Spent 2 days troubleshooting a users problem in scotland over VPN trying to resolve this.. then had the laptop sent back and ran this one command and it fixed it.. Wish i'd found this post sooner!!

    Thanks Again!!

  3. Revolus says:

    You are the best of the best, I spent about 3 days troubleshooting this problem. So, I finally get it fix, thank you.

  4. eRez says:

    after months of having various programs crashes, i've finally managed to overcome this issue!

    thanks a million!

  5. Thanful says:

    This posting was soooooooooooo helpful. Thanks a million.

  6. Luk says:

    It worked like magic, thanks.

  7. Kevin says:

    Excellent post. Worked as advertised!

  8. Yura says:

    Thank you very much! Your post saved my time and nerves!

  9. piter says:

    Thank you very much for your help and your knowledge.

  10. ErG says:

    Finally! found your easy and valid solution for my .NET Framework 2.0 SP2 error.

    Thank you very much!!

  11. Very useful blog posst.

  12. SyN Lambo says:

    WTF!!! For how many Years I battle for that problem, you are the only solution!! Thank you!!!

    Can You Help me about something…. I cant play my games because of an error: 0xc0000005 and i dont know why?? my graphics card updated, my RAM is doesn't have any bad sectors, and my drivers updated…

    Help me Please!! xD Comment if you know the solution!! Thanks!!!

  13. Hi SyN Lambo – I'm sorry, but I'm not sure what would be causing that error when you try to run your game.  I'd suggest searching on the web site for the manufacturer of the game to see if they have any FAQs or troubleshooting steps that you can try.  They might also have a technical support team that you can contact for further assistance.

  14. crazyPig says:

    Thank you so much for this! For several hours I have tried other stuff to fix my Net Frameweork —> only yours worked 🙂

  15. Tomy says:

    Hello, I tried that. But, an error happened :" This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package", my PC is Windows XP with Windows Installer 4.0, help me please!, sorry if there is mistake for my English here..

  16. Hi Tomy – I'd suggest first trying the repair tool described at…/10359320.aspx.

    If that doesn't work, then I'd suggest trying the manual uninstall steps described at…/487096.aspx.

    Hopefully one of these will help in this scenario.

  17. betty lynn says:

    I really appreciate the info above, but do I enter this in a com prompt?

  18. Hi betty lynn – Yes, you can run these commands from a cmd prompt.

  19. Demis says:

    Congratulations !!! Bravo again and again for sharing this. So usefull. Nothing else worked, and this fixed everything.

    This should be no 1 in search for corrupted net framework problem solution.

    thank you

  20. Fernan says:

    Simply amazing!

  21. Abhishek Dhar says:

    You are a savior really ! Have been struggling since morning and finally found your blog that got rid of the problem (Just like that !!!). Thank you very much for the advice.

  22. Tomolimo says:

    Really good, applied on my server and tada, back to operations!

    thank you,



  23. MBM says:

    Hello everyone, im with this error and im sure that you could give me a hand:

    "EventType clr20r3, P1 autoprinter.exe, P2, P3 52614620, P4 mscorlib, P5, P6 5266e591, P7 41cc, P8 27, P9 kfm023ao4dtnwt0ekmskuwe5brorh3fc, P10 NIL."

    My PC is an Windows XP SP3 , and im having this problem with the aplication "autoprinter" is an app developed in my firm, and im trying to solve this error.

    I apreciate all the help that i can get! 🙂

    Best regards,


  24. Hi MBM – I can't tell from that event log information whether this is a problem with the .NET Framework or a problem with the application itself.  To try to narrow this down, I'd suggest using the steps and tools listed at…/8108332.aspx to remove the versions of the .NET Framework that are currently installed on your computer and then re-install the .NET Framework 3.5 SP1.

  25. Leon says:

    there is no success for me, – Installer says that this command only valid for already installed products…

    may be problem is in the language? I am using Dutch version of Win XP . or something with the "spaces" in the command?

    is there space between second and third row?

  26. Hi Leon – The command lines should be the same on all language versions of Windows.  I'm not sure what you mean by the second and third rows though.  What is the exact command line you tried to run?

    Also, if the command lines in this blog post don't help, then I'd suggest trying the steps at…/8108332.aspx to uninstall the .NET Framework.

  27. Andrei H. says:

    Hello, got a question… we're running in a business environment and use an application developed with .net that is some sort of computer manager, all in one center for programs, downloads and the such. The issue is that, for a limited number of clients, mostly those that relay heavily on Visual Studio, their .Net 2.0 that comes with Windows 7 gets broken and hence the Performance Profiler from VS prompts the user every minute or so that the custom application has crashed. Question is, how can we repair the built in .net version from windows 7?

  28. Hi Andrei H. – Here are the steps that I suggest for this type of error:

    1.  Install the latest Windows service pack if you haven't yet.

    2.  Try to run the System Update Readiness Tool from…/947821.

    3.  Try to repair the files that are a part of your OS by using the steps listed at…/how-to-repair-the-net-framework-2-0-and-3-0-on-windows-vista.aspx.

    If none of the above help, you might need to repair/re-install Windows to fix this type of error.

  29. ZZ says:

    Just wanted to say thank you, this took care of my .Net issues on a 2003 Server which was failing multiple .Net patches from WSUS.   Appreciate it!

Comments are closed.

Skip to main content