Tuesday, February 11, 2014

New Web Part not appearing in Web Part Gallery - SharePoint

A recurrent problem is that new webparts doesn't appear after deployment on the SharePoint server

First of all be sure that your new webparts are included in the feature (left side) and that the scope of your feature is right

You tried to update your solution.wsp  :

Update-SPSolution –Identity solution.wsp –LiteralPath “C:\solution.wsp” –GacDeployment


You  tried to retract , delete and then add and install your solution but no result :

Uninstall-SPSolution –Identity solution.wsp –WebApplication http://mysite/  

Remove-SPSolution –Identity solution.wsp 

Add-SPSolution -LiteralPath C:\sharedfolder\Release\solution.wsp

Install-SPSolution -Identity "solution.wsp" -webapplication "http://mysite/" -GACDEployment



The solution for this problem is to disable your feature before retracting and then enabling it after installation :



Disable-SPFeature -Identity solution_Feature1 -url "http://mysite/" 

Uninstall-SPSolution –Identity solution.wsp –WebApplication http://mysite/  

Remove-SPSolution –Identity solution.wsp 

Add-SPSolution -LiteralPath C:\sharedfolder\Release\solution.wsp.wsp

Install-SPSolution -Identity "solution.wsp" -webapplication "http://mysite/" -GACDEployment

Enable-SPFeature -Identity solution_Feature1 -url "http://mysite/"

Deploying List Definition with Instance without losing old Data - Sharepoint 2013

If you have a sharepoint list instance in a sharepoint 2013 site with lot of data in it. This instance has been created using a custom List Definition.

If you retract and deploy your solution it'll delete the current instance of the list that has your records.
How can you deploy the List definition without losing old data?

In my case my custom list is lstSimpleRegister
and the instance is lstSimpleRegisterInstance

To resolve this problem you can change the Deployment conflict resolution property to : None
See below :