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

半世苍凉 提交于 2019-12-03 23:47:19

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.

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 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!

ranjit

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.

Something similar happened me. I ran JSLint from Visual Studio and it added a .json file which should not be deployed with the app. Setting the deployment type to NoDeployment fixed it.

I have had the same problem. Problem was that the app.config file of the SharePoint App project has Deployment Type: 'ElementFile' and was going to be deployed to the host web. This should not happen and generated the error.

Solution: Change Deployment Type of the app.config to 'NoDeployment' and redeploy.

Have you configured following service applications?

  1. App Management Service Application.
  2. Microsoft SharePoint Foundation Subscription Settings Service Application.

Try configuring following these along with the following

 3. Managed Metadata Service Application.

Refer: http://www.sharepoint-journey.com/app-development-in-sharepoint.html#sthash.00z9jnjB.dpuf

I saw this error when I forgot to open Visual Studio with "Run as administrator" privileges.

Solution

Configure Managed Metadata service application correctly.

Check your domain ip in DNS server.(get your ip from ipconfing from CMD )

Also make sure you have the below service applications configured correctly

  1. App Management Service Application.

  2. Microsoft SharePoint Foundation Subscription Settings Service Application.

Then i looked in to Event Viewer. I found below problem

Then I started the Distributed Cache .

Then i deploy the solution the problem solved. :)

More Details :- http://sharepointstuts.blogspot.com/2015/12/the-content-database-on-server-is.html

I just changed the hosting type in AppManifest.xml from Provider-hosted to SharePoint-hosted and voilá. I don't know if this was modified by itself when I added an Event Receiver in my project, cause before not fails.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!