ERROR: Unrecoverable build error when building Setup project in VS.Net 2005


All replies

  • Reboot, open your project again, got to  Build->Clean<app name>
    Then try to rebuild it again.

    Tuesday, November 8, 2005 11:25 PM
  • Dustin:

    Thanks for response. I did as what you suggested but it did not work.
    Wednesday, November 9, 2005 12:17 AM
  • Me too.
    I've written a simple project in vb2005 and when i try to build a setup project this error is always returned.
    I did as MS suggests with no results..... help!

    Thursday, November 24, 2005 1:01 AM
  • I finally solved the problem by getting rid of everything relative to .net earlier version and then reinstalling 2005 .net.
    Monday, November 28, 2005 2:49 AM
  • Damn!
    I've just reinstalled VS2005, after removing everything about it and .NET Framewok 2.0 and 1.1.
    But the problem still appears. I don't know what to do.
    Creating an empty project setup it succesfully builds, but adding the primary output from the project i want to distribuite, the build process always fails.
    I hope for suggestions from MS.
    I don't think about reinstalling Windows. It may be the solution, but i'm afraid of the problem still remains.


    Monday, November 28, 2005 2:51 PM
  • after try,
    run "regsvr32 ole32.dll". 

    I did many try and so I can't tell what is the right one.:-)
    Monday, November 28, 2005 3:10 PM
  • Thank You!!!!!!!!
    Setup built!

    It works right!
    Monday, November 28, 2005 3:43 PM
  • YES, YES, YES !!!

    After trying everything else for at least 3 hours, this finally worked.

    Thank you very much.

    Tuesday, February 21, 2006 4:37 PM
  • THANK YOU !!!! THANK YOU start button > run > cmd > regsvr32 "ole32.dll" Hit enter.  YES SAVED ME HOURS
    Thursday, June 15, 2006 1:57 AM
  • It Worked?  Thanks this has been bugging me for weeks
    Thursday, June 15, 2006 7:17 PM
  • works for me too
    Monday, July 3, 2006 7:02 PM
  • Thanks a lot buddy. I had wasted my evening and  though i would have to reinstall windows before i wll get this thing workable.. but u saved a lot of time ...



    Saturday, September 16, 2006 2:26 PM
    Friday, September 29, 2006 4:54 PM
  • This worked for me:


    Mergemod.dll is not registered correctly
    To resolve this problem, register Mergemod.dll again. Typically, Mergemod.dll is located in the following folder:

    C:\Program Files\Common Files\Microsoft Shared\MSI Tools\Mergemod.dll

    To register the Mergemod.dll, type the following command at a command prompt, and then press ENTER:

    regsvr32 "C:\Program Files\Common Files\Microsoft Shared\MSI Tools\mergemod.dll"
    Thursday, October 12, 2006 11:32 PM
  • Thank You Yian
    your solution works just gr8!!!
    Tuesday, October 17, 2006 6:46 AM
  • unfortunately nothing worked for me. still getting the same error. tryed everything.
    i do get the error even when i'am trying to build an empty project.

    I registered the mergemod.dll
    the ole32.dll
    changed the folder names
    uninstalled and reinstalled vsto
    checked the registry settings....and still it isnt working....probably my last option is the trash :(

    any additional ideas

    Wednesday, November 15, 2006 11:50 PM
  • Just another datapoint, I started getting this error today (it started happening after I had accidentally deleted a file that was included in the setup).  regsrv32 "ole32.dll" fixed it.


    Friday, December 8, 2006 2:01 AM
  • Just curious...

    Why does registering ole32.dll that fix the problem?  And how did you figure that out?

    Worked for me just fine though - thanks a lot!



    Wednesday, December 13, 2006 4:59 PM
  • Thank YOU !!! YIAN

    It's WORK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!






    Friday, December 15, 2006 3:00 PM
  • We have started getting this error too, but surprisingly only when we build the project using command-line:

    "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\" SvtClient.sln /Build Release /Project SetupSVT\SetupSVT.vdproj

    If I open up the IDE and build it, it builds just fine! I've tried all solutions suggested in this thread, to no avail. Any other ideas anyone??
    Friday, February 16, 2007 2:47 AM
  • Can you give more detail ? run > cmd .... did not work what of the KB did you try???


    Wednesday, March 7, 2007 9:13 PM
  • Yep, worked for me.  Thank you, don't think I'd ever have got there!

    (Note for others: I needed to restart Visual Studio as well, but after that started working fine)

    Saturday, March 10, 2007 5:55 PM
  • Great, it really works! Maybe KB article should be updated for VS2005?
    Friday, March 30, 2007 8:16 PM

    Thank you very much !

    Saturday, April 14, 2007 5:43 AM
  •  Ameya Barve wrote:
    We have started getting this error too, but surprisingly only when we build the project using command-line:

    "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\" SvtClient.sln /Build Release /Project SetupSVT\SetupSVT.vdproj

    If I open up the IDE and build it, it builds just fine! I've tried all solutions suggested in this thread, to no avail. Any other ideas anyone??

    Ok, the problem is getting worse; now we can no longer build even using the IDE, we get the "Unrecoverable build error" in the Error List window.

    Here's what I've tried so far:
    • regsvr ole32.dll
    • regsvr C:\Program Files\Common Files\Microsoft Shared\MSI Tools\mergemod.dll
    • Ensured the registry values as per are set correctly
    No luck. Any other ideas?
    Monday, May 21, 2007 11:40 PM
  • thank you
    Wednesday, June 6, 2007 2:34 PM
  • I am having the exact problem you are describing - command line fails, VS user interface fails also. However, other setup projects are building OK just not our very large one. Also the large project builds on other machines. I have tried all the remedies recommended here without luck.

    If you solve this problem please post a message here. I'll do the same.
    Friday, July 13, 2007 6:21 PM
  • I finally got my project to build. In addition to all remedies mentioned here I also got the latest updates from MS for XP that did include a few .net items but nothing seemingly relevant. Still this step finally got the setup project to build without an error.

    Friday, July 13, 2007 8:28 PM
  • 'regsvr32 ole32.dll' did the trick.


    Thank you !

    Thursday, August 23, 2007 11:20 AM
  • Thank you very much dude.

    Does anybody knows why this error occours?

     Yian wrote:
    after try,
    run "regsvr32 ole32.dll". 

    I did many try and so I can't tell what is the right one.:-)
    Thursday, October 4, 2007 9:01 PM
  • Thanks a lot for your help

    Thursday, October 18, 2007 5:36 PM
  • I love the Internet!!! - Running regsvr32 ole32.dll and it works :-)


    Tuesday, December 11, 2007 9:59 AM

    I'd like to post a great thanks to all of you. I tried lots of things without success until I found your helpful suggestions.
    Friday, December 28, 2007 10:56 PM
  • Thank you

    it worked
    Sunday, January 27, 2008 12:48 PM
  • Problem still there in VS 2008
    Apparently Microsoft needs to alert folks to this problem and ADD the comment about registering OLE32.dll. I have VS2005 and VS2008. I have not tried to create a Setup/deployment with VS2005, but I have with VS 2008.
    After doing everything in:
    It still did not work UNTIL I did --  run "regsvr32 ole32.dll" as suggested by Yian above.

    Thursday, April 24, 2008 2:16 AM
  • I tried both the suggested remedy from the kb article and registering ole32.dll and still did not have success.  I run devenv from the command line from my continuous integration server and one day it just started failing.  No code had changed, it just started failing.

    I searched all over and finally found someone in the same position that said they fixed it by deleting the user profile for the account that runs the build.  I tried this today and it totally fixed the issue.  Looks like MS doesn't cleanup the temp folders when running and after thousands of builds it can no longer scratch temp data to disk.  I found one directory with over 65055 directories in it.  lol   Needless to say deleting the user profile directory took almost and hour.

    Hope this helps someone out there.
    Thursday, November 20, 2008 10:14 PM
  • Thanks, 

    regsvr32 ole32.dll solved the problem.
    Sunday, December 7, 2008 11:19 AM
  • I had backup software that was locking access to one of the temporary files. Disabling the backup service solved the problem.
    Saturday, September 12, 2009 4:11 PM
  • If you are going to register the above mentioned dll's then you have to be sure on the correct syntax

    to register the ole32.dll :-

    open start run. in the dialog type :-

    regsvr32 ole32.dll 


    regsvr32 "ole32.dll"

    to register the merge.dll :-

    open start run. in the dialog type :-

    regsvr "C:\Program Files\Common Files\Microsoft Shared\MSI Tools\mergemod.dll"


    regsvr C:\Program Files\Common Files\Microsoft Shared\MSI Tools\mergemod.dll

    note .... the " " binds the address with the spaces

    Friday, April 22, 2011 9:20 AM
  • I have found all these suggestions on different forums and none of them worked for me.

    In Visual Studio 2008 I get the error: "ERROR: Unrecoverable build error"

    Running it from the command line I get a popup message saying: "C:\Program Files (x86)\Microsoft Visual Studio 9.0\smartdevices\sdk\sdktools\cabwiz.exe is not a valid win32 application". In the command line I then get the message "Access is denied"

    I did a search on cabwiz.exe on my machine and I found it in 2 directories:
    1) C:\Program Files (x86)\Microsoft Visual Studio 9.0\SmartDevices\SDK\SDKTools
    2) C:\Program Files (x86)\Windows Mobile 6 SDK\Tools\CabWiz

    The first one is the one that VS uses and strangely this one is now 0 Kb. No idea how the first cabwiz.exe has become 0 Kb. I have succesfullt used it before.

    Copying the second cabwiz.exe (which is 128 Kb) into the "VS directory" solved the problem for me.


    Saturday, November 12, 2011 1:19 PM