0

I am trying to deploy SharePoint web parts that are based on a SharePoint project developed beforehand. I deployed them using a .bat and .ps1 files, running the former from command prompt. I've been getting a few weird errors with this. The first time I deployed, it was a success. But when I couldn't find the web parts, I decided to redeploy and.....

  1. When I use command prompt, it tells me that the .wsp solution file was deployed. But when I double-click the .batch file, it says only a machine admin can run the cmdlets specified in the file.
  2. When I "run as admin", it complains that the batch is not pointing to a .wsp.
  3. A more consistent "error" is that the command prompt simply stops when it reaches the "Deploy Solution" command.

So if I can't find the web parts after deploying them, then what should I do? Continue hunting them? Redeploy? If the latter, then what should I do to avoid it freezing at the deploy command?

Note: After I change my .wsp solution file into a .cab file, I discovered only one of the webparts I made is in the solution. How do I get all of them in one solution?

Additional Note: I think one other problem is that the Feature is not installed. When I look at Central Administration, it says there is a feature, yet when I pour through the files in Web Server Extensions/14, I find nothing. What happened?

1
  • can you share the .bat & .ps1 file?
    – Waqas Sarwar MVP
    Aug 30, 2014 at 2:01

2 Answers 2

1

You can go to the webpart gallery and check whether webparts are there first. If not, then you have to make sure you run as admin the PowerShell as well as try including the user as farm admin.

There can be errors sometimes which occur only when activating the feature but not when installing the solution. So try running the script for just to add the solution and then manually go to the Central Administration and deploy.

Another possibility is that the webparts are not bound as safe controls.

Also make sure the user who deploys the wsp has dbOwner and dbSecurityAdmin permissions at the configuration database and the particular content database. If you use the farm admin, he already have those.

3
  • When I check the webpart gallery after deploying, all it has are .dwp and .webpart files. Assuming nothing went wrong, I should see .wsp files there?
    – Chris
    Sep 2, 2014 at 23:12
  • Never mind, I see one of the webparts, but...I was expecting all four, not just one. And I checked the solution file too...
    – Chris
    Sep 2, 2014 at 23:23
  • wsp files will be at the farm solutions list. Another thing you may want to test is deploying a brand new webpart and whether it is going. Then check if there is anything missing in the webpart configuration information. Sep 3, 2014 at 3:15
0

First thing is take backup of your wsp and rename it to say mywsp.cab . This will show you a zip file with all the items in wsp . Check if the desired webpart is there or no .

If the webpart is present : Goto central admin -> System settings->Manage farm solution

Retract and remove your solution which you deployed .

Copy the wsp under above folder like package_06262014

Open powershell and run the below command one by one :

Add-PSSnapin "Microsoft.Sharepoint.Powershell"

Add-SPSolution D:\Installs\package_06262014\urwspname.wsp

Goto central admin and deploy the urwspname.wsp

1
  • the wsp doesnt have the webparts , thats why you cant see them :) clean the solution , try to create package in debug or release mode . then zip and check .
    – Nikhil J
    Sep 2, 2014 at 16:34

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.