Why do I get “An error occurred while validating. HRESULT = '80004005'” when building a setup project?

前端 未结 11 588
北荒
北荒 2020-12-09 09:10

Why do I get the following error when building a setup project?

An error occurred while validating. HRESULT = \'80004005\'

相关标签:
11条回答
  • 2020-12-09 09:40

    I ran up against this issue today. The solution in my case? Restart Visual Studio 2008.

    0 讨论(0)
  • 2020-12-09 09:40

    I know this is kinda old news, but my particular issue and solution are not specifically stated here (as far as I can tell - if I missed it, I apologize).

    I had same problem. It would not compile my project, but had no errors. All I could see was "Build Failed". I opened up the "Output" file (Click View--> Output on menu), and it told me exactly which reference (in my case a .dll) was causing the problem.

    I deleted and recreated the reference and it changed the reference name from Microsoft.Office.Core (which was appearently only a 32 bit version) to "OFFICE". Then everything worked great. -- Make sure to make a note of the path to the file you are referencing in the properties window... My new path was exactly the same, but the reference name changed anyway.... still scratching my head on that one...

    So the moral of the story is... When you get no errors and your build fails, check the "Output" tab and it might help.

    0 讨论(0)
  • 2020-12-09 09:41

    In my case I had installed Visual Studio 2010 alongside Visual Studio 2008. My setup project, when opened in Visual Studio 2008 gave the same error, but was OK in Visual Studio 2010.

    If copied to another machine that did not have Visual Studio 2010, but did have Visual Studio 2008, then it would compile.

    0 讨论(0)
  • 2020-12-09 09:42

    I installed Visual Studio 2010 and converted the solutions to that version. Because of performance issues I changed my solutions back to Visual Studio 2008. Everything was better now but I got an error when I tried to compile the setup project. I realized that I had a Visual Studio 2010 Test Project in my solution so all I had to do was unload the Test Project and Build the setup project again.

    Summary: unload any Visual Studio 2010 project in solution.

    I hope it helps.

    0 讨论(0)
  • 2020-12-09 09:43

    While simply removing and re-adding the project dependencies will work in many cases, it is important to note that:

    The error message "An error occurred while validating. HRESULT=80004005." usually happens when project is referenced to the other project which is not added into the currect [sic] solution. Setup project only supports dependency projects within same solution.1

    0 讨论(0)
提交回复
热议问题