2
votes

I'm developing some SharePoint web parts, which are in a SharePoint solution. Over time i've added some new visual webparts to the solution and in my development environment these new webparts can be used right after a retract/deploy. But after packaging and copying the .wsp to the production server i can uninstall (retract & remove) reinstall (add & deploy) whatever i want, the new webparts never become visible. The existing ones are all updated perfectly, but i'm really curious about why the newly added webparts never become visible.

I've double checked that the .wsp i copied contains all new web parts by opening the .wsp with winrar.

For uninstalling the current version i use:

Uninstall-SPSolution –Identity MySharePointSolution.wsp –WebApplication http://myspwebapp
Remove-SPSolution –Identity MySharePointSolution.wsp

For installing the new version i use:

Add-SPSolution “D:\Deploy\MySharePointSolution.wsp“
Install-SPSolution –Identity MySharePointSolution.wsp –WebApplication http://myspwebapp –GACDeployment

But after doing all this, nothing seems to have changed. Does anyone have a good solution on how to get things updated?

1
Can it be that the old version of the web part is cached somewhere? I've searched for trails of remaining bits of a previous install, but couldn't find anything.Tys
By using the SharePoint Manager 2010 from CodePlex i was able to delete the webpart solution. After installing it again, i activated it by using the same SPM tool. And now i have my webparts visible. Only, i cannot add the controls to the page because the aren't marked as safe.Tys
That means you are missing the entries in the web.config, marking them as safe. Sure that your WSP is working correctly?Dennis G
hi, in vs2010, try checking which feature contains your web part and then make sure that feature is activated. Afterwards (if it is) deactivate is and then activate it again. one other thing, you can user 'Upgrade-Solution' instead of the 4 commands.Mor Shemesh
Be very careful with "Upgrade-Solution" it will silently fail to deploy new features or changes to elements.xml files: msdn.microsoft.com/en-us/library/aa543659.aspxKelly Adams

1 Answers

4
votes

When performing SharePoint 2010 WSP deployments I had this same problem where existing custom webparts would get updated but new webparts wouldn't be available. This was addressed by retracting, removing, then adding, and deploying the WSP... and then iterating through all of the site collections \ sites and deactivating \ activating the custom features which contain those webparts.

I betcha that'll do the trick :)