"25007.Error occurred while initializing fusion. Setup could not load fusion with LoadLibraryShim(). Error: The handle is invalid."

While Installing .Net Framework 2.0, you may receive the following error "25007.Error occurred while initializing fusion. Setup could not load fusion with LoadLibraryShim(). Error: The handle is invalid."

From the verbose log:

07/09/10 12:59:23 DDSet_Status: CustomActionData: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.VisualBasic.Vsa.dll;28672
07/09/10 12:59:23 DDSet_Status: Loading mscoree.dll
07/09/10 12:59:23 DDSet_Status: Loading fusion.dll using LoadLibraryShim()
07/09/10 12:59:23 DDSet_Error: Error occurred while initializing fusion. Setup could not load fusion with LoadLibraryShim(). Error: The handle is invalid.

MSI (c) (98:B0) [12:59:23:588]: Font created.  Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg

Error 25007.Error occurred while initializing fusion. Setup could not load fusion with LoadLibraryShim(). Error: The handle is invalid.

Even if you try installing .Net Framework 2.0 SP2 on the system, you would find the following log snippet:

MSI (s) (E4:94) [15:30:26:250]: Executing op: ActionStart(Name=CA_NgenServiceVersionCheck.3643236F_FC70_11D3_A536_0090278A1BB8,,)
MSI (s) (E4:94) [15:30:26:250]: Executing op: CustomActionSchedule(Action=CA_NgenServiceVersionCheck.3643236F_FC70_11D3_A536_0090278A1BB8,ActionType=1025,Source=BinaryData,Target=NgenServiceVersionCheck,CustomActionData=C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\mscorsvc.dll;C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\mscorsvw.exe;C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\ngen.exe;)
MSI (s) (E4:9C) [15:30:26:250]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSIA0.tmp, Entrypoint: NgenServiceVersionCheck
07/08/10 15:30:26 DDSet_Status: LANGID: 1033
07/08/10 15:30:26 DDSet_Entry: NgenServiceVersionCheck started - Ngen Service Version Check
07/08/10 15:30:26 DDSet_Status: Custom Action Data: C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\mscorsvc.dll;C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\mscorsvw.exe;C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\ngen.exe;
07/08/10 15:30:26 DDSet_Status: Version Folder: C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\
07/08/10 15:30:26 DDSet_Status: File Version for C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\mscorsvc.dll is 2.0.50727.3053
07/08/10 15:30:26 DDSet_Status: File Version for C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\mscorsvw.exe is 2.0.50727.3053
07/08/10 15:30:26 DDSet_Status: File Version for C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\ngen.exe is 2.0.50727.3053
07/08/10 15:30:26 DDSet_Status: All required file versions matched: 2.0.50727.3053
07/08/10 15:30:26 DDSet_Status: Executing Command to stop ngen service: C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\ngen.exe queue scmstop
07/08/10 15:30:26 DDSet_Status: LANGID: 1033
07/08/10 15:30:26 DDSet_Warning: CreateProcess failed
MSI (s) (E4:94) [15:30:26:312]: User policy value 'DisableRollback' is 0
MSI (s) (E4:94) [15:30:26:312]: Machine policy value 'DisableRollback' is 0
Action ended 15:30:26: InstallExecute. Return value 3.

These kind of errors will cause entries to be written to the System event log. You can run eventvwr.exe and look for error messages with event source "SideBySide". This is generally caused by orphaned Visual C++ runtime assemblies left behind in the %windir%\WinSxS folder after uninstalling the previous build. In order to fix this issue, please follow the steps below:

Create a batch file that has the following commands and run it from a cmd prompt:

for /D %%i in (*vc80*) do rd %%i /s /q
del manifests\*vc80* /q
cd policies
for /D %%i in (*vc80*) do del %%i\* /q

Once it is executed, try installing .Net Framework 2.0.

Comments (29)

  1. Matt says:

    Thank you so much, this allowed me to get V2 installed been at it for many hours.

  2. ethan says:

    i just wanted to say thanks.

    I was stuck on getting .netframework 2  back on a machine

    This bat file fixed it for me and allowed all the other parts of .net framework to go in.

  3. Terry says:

    Hi, I have the same problem when I uninstall .net 2.0 and reinstall again.

    Does it work in server 2003? Thanks!

  4. Gerard says:

    Yup, this works on a Win2k3 machine. I've just reinstalled .net 2.0 and 3.5 on this machine :).

  5. haissam says:

    you are a genius my friend I been struggling for more than 2 hours to fix it.

    thank you very very much

  6. Ivan says:

    Will doing this stop .net 1.1 from working on my windows 2003?

  7. The above step shouldn't impact .Net Framework 1.1

    Is your OS Windows 2003 x86?

  8. adam says:

    awesome spent hours trying to resolve this..

  9. oskar says:

    brilliant. spent all morning trying to sort this.

    worked like a treat

  10. Joni says:

    someone can help me to create this file need to install net framework 2.0

  11. Martin says:

    You just saved me a lot of time.  Thank you sooooo much!

  12. chris says:

    sweet – worked for me.  You the daddy.

  13. Evert says:

    Works like a charm. Thanks!

  14. RickVill says:

    My man…I have no words to express how thankful I am for this!!!

    You've saved my life.

  15. Sambath says:

    Thank You!!!!

    i'm feeling good luck when the problem solved.

  16. Armin says:

    Cant f**kin belive works for evryone but not for me ! OMG same error evry time

  17. T_T says:

    for a minute i thought it works, but same problem..huhu

  18. Hong says:

    That did the trick, thanks!!

  19. Jørn says:

    If you still don't get it to work, try uninstalling .Net 4.0 first. That solved it in my case.

  20. carmenKim says:

    Awesome!! Thanks a lot. I didn't solve at the first time. After uninstalling .Net 4.0, everything solved

  21. Matte says:

    YES! Thanks!

  22. Casey says:

    Excellent! I was going out of my mind for what seemed like ever until I stumbled upon this. Just wish I found this a lot soon.

    Thank you so much!

  23. Struja says:

    Thans man, You saved my sorry a%$.

  24. BenTsp says:

    Thank you a lot. It solves my problem easily … after a very long searching time.

    1. Detelin says:

      same was with me, God bless this guy ^^

  25. Thx a lot! ) says:

    I don't know what helped exactly, this trick or deinstallation of Framework 4.0, cause I did them both, but! This solved a MUCH more problems for me at XP SP2 than it supposed. Because I had stupid phantom error with update.exe / setupapi.dll when I couldn't install nor deinstall any updates and even SP3. It was crashing at "Backing up registry" stage. And all updates was crashing without any specifics in the logs. I tried all ways but with no luck and only this trick solved all my headaches at once! )) Now I'm finally able to install SP3 and all updates and of course Framework, which also not wanted to be installed in no way. Big big thanks for this info! This is a great trick!!! My XP now alive and kicking! ))) Sorry for my not good english. 😉

  26. hoho says:

    your solution help a lot,even tohoug after so many years,thx guy

  27. lupin says:

    Great worked for me on Windows 2003!

  28. Detelin says:

    thank you very much, I wouldn’t be able to play League of legends at the moment without your help, have a nice day 🙂

Skip to main content