6

My build fails every time when I try and build my setup project. The error in the output window is just:

ERROR: Unrecoverable build error

What I have tried already

  • Restarting my computer and Visual Studio
  • Registering ole32.dll
  • Clean and rebuild all
  • Deleting bin and obj folders
  • Removing temporary files with VS in the name in \AppData\LocalTemp
  • Running Visual Studio as an administrator
  • Pausing the real time protection on my antivirus
  • Deleting the temporary file that the setup build leaves in there.
  • Running the process monitor during the build.
  • Checking if my project contains duplicate folder names (it does not).

Note: Similar question but not the same as it is for a much earlier version of Visual Studio:

Community
  • 1
  • 1
user2882061
  • 343
  • 2
  • 9

3 Answers3

17

The problem was solved by registering mergemod.dll.

On my computer it is located at: C:\Program Files (x86)\Common Files\Microsoft Shared\MSI Tools

You need to run regsvr32 with administrative privileges to get it to work.

user2882061
  • 343
  • 2
  • 9
  • 1
    That did the trick for me too. This answer should get more visibility. Thanks! – Raheel Khan Nov 22 '17 at 07:35
  • This worked for me, but needed to run VS as admin afterwards to get past other errors (possibly unrelated) – n00b Mar 23 '18 at 18:22
  • I've just experienced this problem building a setup merge module using the latest VS 2019 16.7 preview 1. After registering mergemod.dll I had to close/restart VS before the problem was solved. – David Lowndes May 27 '20 at 20:01
5

I had to do one additional step on top of the accepted answer:

  1. Register the DLL mergemod.dll (regsvr32.exe C:\Program Files (x86)\Common Files\Microsoft Shared\MSI Tools\mergemod.dll)
  2. Register the DLL ole32.dll (regsvr32.exe ole32.dll)
  3. Delete the cache/temporary visual studio files – which get generated as part of the builds. (C:\users{BUILD_USER}\appdata\local\temp).

Hope that helps!

Isaiah4110
  • 9,312
  • 1
  • 36
  • 53
0

Reinstall (Repair) Visual Studio resolved the problem for me. I've had installed a new software for creating setup programs and it damaged some setup msm files. The easiest mode to repair it was to reinstall VS.

Tratak
  • 116
  • 1
  • 7