This post is article 5 from the 30 Articles App series for SharePoint
In this post I will discuss about how to deploy an App to SharePoint site and then we will discuss about one *well-know* issue for SP2013 preview.
Let me quickly tell you about the possible ways for how to deploy an App to SharePoint 2013.
- You are creating it via Visual Studio 2012 -> hit F5 and your App will be deployed. Simplest and easiest approach for debugging your App.
- Publish your App, get .App file ( no wsps ) and upload to your app catalog. Go to the Site where you want to add this app instance. Your newly deployed App should be available when you go to -> Add an App.
- If you are using NAPA tools it is pretty much doing the same -(2)
- It’s a powershell way 🙂 .
Deployment issue:
If you haven’t noticed yet there is a well-known issue (Mostly a bug in preview), Your Apps sometimes are not installed correctly and you could not retract them as well. You got stuck with this ugly junk hanging to your site!!
Workaround :
“This is a bug in preview” said by Microsoft guys in the Microsoft forum.
How to deal with it then.
(1)Â Change the product Id and then re-deployed the App. Your SharePoint environment will think it as a new App.
Newly deploy App may work (but seriously what about the ugly junk left over your site )
here is a link for question : http://social.msdn.microsoft.com/Forums/en-US/appsforsharepoint/thread/430300f6-5682-4a6f-92b8-73a501f4d9b8
(2) How to get rid-off this not-properly installed App and deploy it without changing the product Id
Uninstall this App using PowerShell and below are the steps:
- Get Instance of Not-properly installed App’ Instance as following :
- $instance = Get-SPAppInstance -Web http://mysharepointSite/ -AppInstanceId ‘f14876c4-26bd-41ea-8480-7a529882dd60’
- Uninstall-SPAppInstance – Identity $instance
It did work perfectly for SharePoint hosted apps.
For auto-hosted Apps it didn’t work as it is waiting on some Job to be finished before It can uninstall this App. “Another job exists on this instance. Please retry after that job is done.” this error message appears as below:
Question of the Article :
How to monitor those jobs against your App (specially for not-properly deployed ones) and how to kill them so we can finally uninstall our App?
I would love to hear your thoughts and experience about this.
Note: This article is written for SharePoint 2013 preview.












