SharePoint App Deployment error : 'Failed to install app for SharePoint'

In my sharepoint-hosted add-in, I face this issue when have some *.json files(.bower.json, bower.json) inside my sharepoint project folder, after I delete them and run again my app works!


I had the same problem after updateding my NuGet packages. A file called version.json was added and caused this issue. Setting the deployment type to NoDeployment fixed it.


In my case I got this error when I inadvertently changed the TemplateType value in the instance's Elements.xml file .without making the same change in the Element's Definition (the other Elements.xml directly under the Elements root).

Therefore there was a mismatch in the two elements.xml of the list being deployed.


It is because SharePoint is trying to activate your app as a standard SharePoint feature, when its really an App.

In the features folder of the SharePoint project, there will be a Feature named Feature1.

Open Feature1 and ensure it's contained in the "Items in the solution" list and not in the "Items in the feature" list.

After that you should be able to deploy.