SharePoint 2013: Error occurred in deployment step 'Install App for SharePoint': Failed to install App for SharePoint.
The scenario: You want to start building SharePoint-hosted app for SharePoint 2013 on your dev machine(!). You have SharePoint installed (and some basic configurations about) SharePoint 2013. You download working code form internet or use an empty VS 2012 app template. Run VS solution and you get the following error.
The problem: Error in VS 2012: “Error occurred in deployment step 'Install App for SharePoint': Failed to install App for SharePoint.”
The solution: Verified that you have correctly configured your environment to support SharePoint-hosted app.
Visual Studio doesn’t give you much information why the step 'Install App for SharePoint' failed.
In my case – I lose one day before I realized that I haven’t configured my environment. (Sound stupid but thinking about all this app stuff, I have missed the basic.) So if you experience the above error, I will recommend you first to double check if you have everything in the list:
- developing against Developer Site template;There are many post about setting all this. Just search for “sharepoint 2013 on-premises app configurations”. Here is the MSDN article which can be a starting point.
- service applications (App Management Service and Subscription Service) are configured and running
- App domain setup is performed (records in host file or DNS)
- LoopbackCheck is disabled
- IE is configured for your app domain