How to force uninstall webpart from Sharepoint 2010 - sharepoint

I'm trying to delete a webpart in Sharepoint Server 2010 going at
administration->system settings->manage farm solutions..
And the Webpart shows this message "Deployment Status: Error"
I'm trying "retract solution" and seems work, but when I'm trying to re-deploy the webpart I get the message "Error in the implementation step 'Add Solution': Already installed a feature with ID XXX-XXX - XXX in this set of servers. Use the force attribute to re-add the feature explicitly."
How can I absolute delete this webpart?

It sounds like you need to force uninstall the feature. Here is the command you can run from stsadm.
stsadm -o uninstallfeature -id "yourGUID" -force
Once this is done you can redeploy your solution.

I think you are mixing some terminologies here. In the central administration you only have solutions (i.e. WSP files). Inside this solution you might have a webpart or anything else you want to deploy.
You now state that the solution you want to deploy has the status "deployment error" and you are able to retract the solution.
What you didn't state: After retracting the solution, did you delete it? This needs to be done! Try to delete the solution after retracting, then upload it again and try to deploy again.
If you want to force a deletion there are several possibilities, e.g. using Powershell or stsadm.

Related

Can't Uninstall Sharepoint Application - Invalid State

Our Sharepoint 2013 Application failed to install and is stuck in a odd state. I followed the recommended approach for deleting the application using powershell commands on the hosted Sharepoint server, but it doesn't execute properly.
Visual Studio Deployment/Retract Reports:
Skipping the uninstall step because the app for SharePoint is in an invalid state and cannot be uninstalled.
PowerShell Commands
$instances = Get-SPAppInstance -Web http://mysite/sites/collection
$instance = $instances | where {$_.Title -eq 'Application.Title'}
Uninstall-SPAppInstance -Identity $instance
Executing this PS command throws...
The System Account cannot perform this action.
There is no option from the Sharepoint UI to remove the application, and retrying the install also fails. I've tried other user accounts to execute this powershell command (other than the system account), but no dice. I will have to delete the developer site collection if there is no other solution.
I'm faced this problem before on my Office 365 SharePoint Online when deploy SharePoint Hosted App. Then I submit Microsoft Service request and work with MS Technical Support Team on this issue. This problem seem to be something error in SharePoint backend database by itself (I'm not sure to consider it is SharePoint defect).
Did you check the app details installation error report? If you get the message:
"The content database on the server is temporarily unavailable."
Need help: Error 'Install App for SharePoint': An instance of this App already exists at the specified location., I'm quite not understand the answer but there is one comment from Jeremy Thake which seem to be deleted on this thread, he said that:
"…so I actually just restarted the whole environment and when Windows
came back up and I went to the SharePoint Site…the App was gone ;-)"
So here is my advice before you commit to delete your site collection:
Try to deploy your to the another developer site collection and check whether this problem still occur as the same.
Try to increase your app version or change app name/title/id and deploy to the same site collection and check whether this problem still occur as the same to your new app instance.
For SharePoint Server, try to restart IIS/Window Server if you're able to do that. Also install any latest SharePoint Update/CU.
For Office365 - SharePoint and have you have license account, you should submit the service request, if not you should wait about several day and try to remove this app instance again through UI.
Hope you can remove your app and know the root cause exactly.
I have faced this issue some times in on-premises SharePoint.
But for solving this I gave another account (or you can use 1 that you have) shell admin rights.
Note this account CAN'T be marked as a System account on SharePoint!!
Then with this different shell admin account you execute the same script. That always worked for me (I also got some strange installation behavior and needed do remove the app).

Error occurred in deployment step 'Retract Solution': Feature 'GUID' is not activated at this scope

Some strange issue is popping up while trying to deploy a solution in sharepoint.
Error occurred in deployment step 'Retract Solution': Feature 'GUID' is not activated at this scope.
I am able to build and rebuild, but when trying to deploy, the above shown error is raised.
while trying to retract, the error raised is
Feature 'GUID' is not activated at this scope.
It all happend suddenly.....
It was working perfectly till yesterday!!!....
How do i find out whether the feature with ID is activated? also
How do i activate the feature?
Thanks in advance....
Retract and then install the solution again using 'SharePoint 2010 Management Shell' Install-SPSolution –Identity SharePointProject2.wsp –WebApplication -GACDeployment.
Follow http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/12/02/adding-and-deploying-solutions-with-powershell-in-sharepoint-2010.aspx for proper syntax.
Once it run without error confirm that the required features are activated in the site collection.
Please ensure Features are activated. please follow
Go to site setting.Then select manage site features in site action. Then activate that particular feature
hopes it works .
I had the same issue, the account I was using to deploy from visual studio wasn't a site ower. Once I added the account as site owner, It deployed fine.

How to upgrade a part of a package/solution (customwebform, workflow, etc.) without losing list items

I've been developing a new SharePoint 2010 package in Visual Studio 2010. This is my first development project in SharePoint so please pardon my use of incorrect terminology.
Within the package/solution there are a couple of Features, a couple of custom web forms, and a workflow for the custom list type which is also within the solution.
To develop and debug I've been simply using the Build > Deploy Solution option from within Visual Studio to build the solution and then it would automatically connect to my sharepoint server and create the custom List, install the features, add the workflow, etc.
But when I want to make a change, say change the color of the text on the custom NewForm (mine is called MyCustomForm.ascx) then I click Build > Deploy Solution it deletes the custom list, deletes the workflow, deactivates and deletes the features and then re adds them all again. Thus I lose all of my list items.
In production if I need to modify the workflow I can't simply do this as we would lose all of our list items. How can I do this?
I've done days worth of research and nothing works. I've looked into:
stsadm -o upgradesolution -name SharePointProject1.wsp -filename ...
stsadm.exe -o execadmsvcjobs
with no avail. It says everything "works" fine (no errors) but doesn't update the custom MyCustomForm.
I've also tried manually editing the files in:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\CONTROLTEMPLATES
to no avail as well. I modify the MyCustomForm.ascx file and refresh the SharePoint site page and it hasn't changed.
Any insight would be helpful. I am doing all development on the server machine that is running SharePoint and have admin access if that helps. Thank you in advance for all of your help.
The list is deleted because the solution package that you're deploying has the list item in it so Visual Studio is "helping" by making sure that you get the lastest version of everything (even it it hasn't changed)
There are two approaches you can take to over-ride this behaviour
Set the deployment model to "No Activataion" this will result in the package being deployed and leaving previously deployed and activated feature in place.
Remove the list instance item from the package by double clicking on the Package in the Solution Explorer and then double clicking on the List Instance Item in the right hand pane.
Next time re-deploy the solution you not should have your existing list removed (I'm not 100% on the workflow association behaviour).
Of the two I'd lean towards option 2

WSPBuilder questions for first-time webpart

I have made my first webpart using WSPBuilder. When I try to deploy it using STSADM, I get an error stating access is denied. I am an admin on the machine (well it's a VM).
Also, with WSPBuilder, do I need to change the config files (I assume no as the point of the tool is to automate this)?
Thanks
There could two reasons for your problem
Even though you are the admin of the system you may not have privilege in central Administration. So login in the system with the user name of sharepoint administrator and try to deploy it.
There may be a problem in the way you created the WSP. if you deploy webpart using WSP then there is no need to edit the config file manually. Recently I have created a blog which explain how to create simple webpart, creating WSP and deployment. If interested check it out http://www.allaboutmoss.com/index.php/2010/03/22/hello-world-sharepoint-webpart-for-beginners/
It sounds like you don't have enough permissions to add the webpart. What OS are you on? If it's Windows Server 2008 R2 etc you will have to run the command prompt as an administrator or turn off UAC for administrators. As for the config WSP builder will create you a file called solution.txt which contains the Id for your solution. For more control over what it is doing you can add a WSP Builder config file to your project called "WSPBuilder.exe.config". An example one can be found in "C:\Program Files\WSPTools\WSPBuilderExtensions".
Go to --> RUN--> SERVICES.MSC--> check the following service is started or not.
Windows SharePoint Services Administration, if not pls start this service. if the wsp is deployment done. go center admin--> Operations -->Global Configuration -->Solution management . This page has a list of the Solutions in the farm. check ur wsp in this list.

Webpart missing webpart catalog entry when build with vsewss but deployed with stadm

I have the exact problem of not getting any webcatalog entry for a webpart if i deploy via stsadm. The project of this webpart is generated with vsewss and build with it. The very webpart entry can be accessed if its deployed through vsewss' "deploy" command. But i have to make the deploy process with stsadm because of an automation reason.
any ideas ?
thanks a lot.
koray.
You need to activate the features when deploying via stsadm, VSeWSS does that for you and hides the need while you are developing.

Resources