Tuesday, February 23, 2010

An error occurred while validating. HRESULT = '80004005'

You get "An error occurred while validating. HRESULT = '80004005'" error while building Setup Project(S) in Visual Studio 2008 where as project (A) included in the setup build successfully.

This error occures if something is wrong with references of the project(A)

Follow steps below to troubleshoot.

  • If you have multiple project outputs in your solution, identify the project that is giving the problem. You can do that by removing one project at a time from the Setup Project(S) until error goes away.

  • Once project is identified, identify the reference that could be giving the problem.

    • Check if the project(A) is referencing to a project that has been removed from solution. - Remove such references if any.

    • Check if the Project(A) is referencing to a project that was moved to a diffenrent physical location after it was added as a reference. - Remove and add such references.

  • Rebuild setup project after fixing the reference accordingly to see if error goes away.