"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:

cd %SYSTEMROOT%\WinSXS
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

  • Anonymous
    November 20, 2010
    Thank you so much, this allowed me to get V2 installed been at it for many hours.

  • Anonymous
    February 07, 2011
    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.

  • Anonymous
    February 19, 2011
    Hi, I have the same problem when I uninstall .net 2.0 and reinstall again. Does it work in server 2003? Thanks!

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

  • Anonymous
    April 17, 2011
    you are a genius my friend I been struggling for more than 2 hours to fix it. thank you very very much

  • Anonymous
    May 15, 2011
    Will doing this stop .net 1.1 from working on my windows 2003?

  • Anonymous
    May 17, 2011
    The above step shouldn't impact .Net Framework 1.1 Is your OS Windows 2003 x86?

  • Anonymous
    June 28, 2011
    awesome spent hours trying to resolve this..

  • Anonymous
    July 10, 2011
    brilliant. spent all morning trying to sort this. worked like a treat

  • Anonymous
    August 31, 2011
    someone can help me to create this file need to install net framework 2.0

  • Anonymous
    December 09, 2011
    You just saved me a lot of time.  Thank you sooooo much!

  • Anonymous
    January 27, 2012
    The comment has been removed

  • Anonymous
    February 26, 2012
    Works like a charm. Thanks!

  • Anonymous
    March 22, 2012
    My man...I have no words to express how thankful I am for this!!! You've saved my life.

  • Anonymous
    April 09, 2012
    Thank You!!!! i'm feeling good luck when the problem solved.

  • Anonymous
    April 15, 2012
    The comment has been removed

  • Anonymous
    July 25, 2012
    for a minute i thought it works, but same problem..huhu

  • Anonymous
    November 08, 2012
    That did the trick, thanks!!

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

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

  • Anonymous
    April 22, 2013
    YES! Thanks!

  • Anonymous
    November 14, 2013
    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!

  • Anonymous
    January 10, 2014
    Thans man, You saved my sorry a%$.

  • Anonymous
    May 09, 2014
    Thank you a lot. It solves my problem easily ... after a very long searching time.

    • Anonymous
      May 04, 2016
      The comment has been removed
  • Anonymous
    August 05, 2014
    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. ;)

  • Anonymous
    October 10, 2014
    your solution help a lot,even tohoug after so many years,thx guy

  • Anonymous
    January 31, 2016
    Great worked for me on Windows 2003!

  • Anonymous
    May 04, 2016
    thank you very much, I wouldn't be able to play League of legends at the moment without your help, have a nice day :)