0

We have deployed webpart using powershell but cannot find it under the Edit page-> add webpart -> custom, there is no folder called 'custom'. This folder otherwise comes up when deployed via VS.

$solution="mywebpart.wsp"
$path= $solutionPath + $solution 
Add-SPSolution -LiteralPath $path
install-spsolution -Identity $solution -WebApplication $oURL  -GACDeployment
WaitForJobToFinish 

We checked under central admin -> system settings -> manage farm solution, it shows that it is deployed to the correct URL.

4
  • Has the feature been activated? Apr 8, 2014 at 5:55
  • oh. right. I will check this
    – variable
    Apr 8, 2014 at 5:56
  • Do I have to run powershell to activate the feature every time I create a new site collection? Is there anyway to automate this?
    – variable
    Apr 8, 2014 at 5:58
  • See my answer.. Apr 8, 2014 at 6:04

1 Answer 1

1

The feature will also need to be activated in order for web part to show up. The next time you deploy a WSP, the feature will remain activated/deactivated depending on its state. That is, if the feature is activated and you deploy the WSP again, you won't need to activate the feature. However, if it is deactivated, it need to be activated again.

4
  • What about the other site collections present? And what about the site collections which will be created in future? Does this feature need to be manually activated so that they can use the webpart?
    – variable
    Apr 8, 2014 at 6:05
  • It will need to be activated in the new site collections. Apr 8, 2014 at 6:07
  • is it possible to use feature stapling to achieve auto activation
    – variable
    Apr 8, 2014 at 6:10
  • Of course feature stapling can be used. Apr 8, 2014 at 6:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.