Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've created a web part, debugging it on a test Sharepoint 2010 install on my local workstation. I'd like to test it on our production server. It seems that I won't be able to use Build --> Deploy to accomplish this, and I have to deal with my assembly and .webpart file.

What are the steps to accomplish this?

share|improve this question
    
You test it on a test/integration/acceptance server, not a production server. –  Bart Aug 13 '11 at 9:14
add comment

3 Answers

up vote 11 down vote accepted

SharePoint solution packages consist of a .WSP file that you can create using Visual Studio (or manually if you so wish).

Before deploying to a production environment, I recommend you take a look through Deploy solution packages (SharePoint Server 2010).

Basically you need to add your solution to the solution database of a SharePoint Server farm using the Add-SPSolution PowerShell cmdlet, then deploy the solution using either Central Administration or the Install-SPSolution PowerShell cmdlet.

Both installation options above provide a choice of installing to either a single Web application, or all Web applications.

share|improve this answer
    
hahaha, we both answered the question with the same link. I'm whacking mine...you beat me to it. :) –  Rob D'Oria Aug 12 '11 at 19:41
add comment

The deploy action creates a .WSP file in your bin\debug or bin\release folder...depending on what you built. You can use that file to deploy the solution...everything you need should be in that package assuming the package was built correctly.

MSDN reference on deployment here: http://technet.microsoft.com/en-us/library/cc262995.aspx

share|improve this answer
    
there is nothing wrong with multiple answers, even if they are the same (especially since we try to improve our answer/question ratio on Area51 so we can get out of beta;-) –  Anders Rask Aug 12 '11 at 21:08
add comment

Alternatively you can create some .bat files and then run them from command prompt as Administrator:

1. Add.bat

"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\stsadm.exe" -o addsolution -filename "C:\YourSolution.wsp"

"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\stsadm.exe" -o deploysolution -name "YourSolution.wsp" -immediate -url http://YourDomain -allowgacdeployment -allowcaspolicies

2. Retract.bat

"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\stsadm.exe" -o retractsolution -name "YourSolution.wsp" -immediate -allcontenturls

3. Delete.bat

"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\stsadm.exe" -o deletesolution -name YourSolution.wsp

Additional resources:

Index for Stsadm operations and properties

share|improve this answer
2  
I think powershell command are best practice and more flexiple to add custom commands to deploy scripts as well. –  SAV Aug 13 '11 at 11:11
    
What's wrong with STSADM? Where does it say powershell is a best practice? –  Kit Menke Aug 13 '11 at 17:20
    
@Kit Menke "In the SharePoint administration context, Windows PowerShell supersedes the Stsadm.exe administration tool. All current and future development of script and administrative files in SharePoint Foundation should use this new Windows PowerShell scripting technology that is exposed in the SharePoint Management Shell." - Sharepoint Foundation 2010 SDK Documentation –  nfw Aug 16 '11 at 21:38
    
Ah! Very cool, I found this link too: msdn.microsoft.com/en-us/library/ee539977.aspx –  Kit Menke Aug 16 '11 at 21:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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