Tuesday, November 5, 2013

Install app for SharePoint: There were errors when validating the App Package

While deploying a SharePoint application out of my Visual Studio, I have got the following error message.

Error occurred in deployment step 'Install app for SharePoint': There were errors when validating the App Package.

This message does not really tell you a lot :) It took me a while to figure out what caused the problem. The reason was simple. No start page was specified in my application manifest file. Once I have set an application start page, the error has gone away!

By the way, Visual Studio 2012 supports a verbose logging mode for SharePoint related activities. If the mode is activated, you receive more detailed error messages and it can enable you to solve an issue quicker.

To turn on verbose logging, follow these steps:

  1. Run the registry editor (regedit.exe) and navigate to the key HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\SharePointTools
  2. Create a DWORD based value and name it EnableDiagnostics
  3. Set the EnableDiagnostics's value to 1