Skip to main content

How to deploy the WSP files in Sharepoint 2010


In our development world, especially with Visual Studio 2010 and SharePoint 2010, we have it very easy for deploying our solutions to SharePoint. As long as we have SharePoint installed on the same box as Visual Studio, we just right click the solution and deploy.
Moving into the real world though, you’ll quickly find that having Visual Studio 2010 on a production or staging environment is not always there. Somehow we have to get our project from source code, to an assembly, and then to SharePoint.
You may have asked:
  • How do I deploy a SharePoint 2010 Solution or WSP file?
  • How do I create my SharePoint 2010 WSP file?
  • Where is my SharePoint 2010 WSP file?
Let’s jump right in and answer those questions…

Assumptions

  • You have a Visual Studio 2010 SharePoint project set up and ready to go.
  • The project compiles.
  • Are able to use powershell.
If you’re looking for a great starter project for SharePoint, why not try your hand at Creating a custom Web Part?
Generating WSP:
The first step is to build your project. So, right click on your project/solution in Visual Studio and choose “Build.” Now depending on your configuration, you’re either going to be building to a debug or release directory. Whatever your scenario is, browse to that location on your hard drive (either of these two directorys will be located in C:\<Project Directory>\bin\<release or debug>.
Your directory should look something like this to the left. There should be, at least, an assembly dll and your .wsp file. From this point onward, you’ll only need that .wsp file. For the sake of keeping things short, let’s move this file to a C:\deploy  directory.
Adding WSP:
  1. Open the SharePoint 2010 Management Shell. You can get to this by going to Start > All Programs > Microsoft SharePoint 2010 Products > SharePoint 2010 Management Shell. Using this will automatically run PowerShell and set up the Microsoft.SharePoint.PowerShell snappin for us.
  2. Type Add-SPSolution c:\deploy\<solution file>.wsp
  3. You should now see a table like structure showing the solution name, its ID and that your solution has not yet been deployed…
Deploying the Solution:

Deploying the solution is now taken care of by one command in PowerShell now called Install-SPSolution.
  1. Back in PowerShell, type:
    Install-SPSolution –Identity <solution file>.wsp –WebApplication http://<url> -GACDeployment
  2. You’re done. Verify that your assembly is the GAC (C:\windows\assembly) and then go activate any features you may have had in your solution.
Overview:
Here’s a quick overview of what we’ve learned with a few more tidbit commands you’ll probably need along the way:

Add Solution:
Add-SPSolution c:\<path>\<solution filename>.wsp

Deploy/Install Solution:
Install-SPSolution –Identity <solution file>.wsp –WebApplication http://<url> -GACDeployment

Update Solution:
Update-SPSolution –Identity <solution file>.wsp –LiteralPath c:\<path>\<solution file>.wsp –GACDeployment

Uninstall Solution:
Uninstall-SPSolution –Identity <solution file>.wsp –WebApplication http://<url>

Remove Solution:
Remove-SPSolution –Identity <solution file>.wsp

References:
 If the above commands aren’t working for you, you’ll find some more detailed information about the commands here:



Comments

  1. Ch 3 equals 1 dc, 2 dc in next V-st, and in each sexcam remaining ch across,
    continue around to opposite side of row 1 work a sc in each next
    2 chs.

    Also visit my blog post :: cam sex

    ReplyDelete
  2. As with the 3 G to the 3 G to replace their car's dedicated GPS nav, too. It must, however, have some troubles trying to use Whispersync, a new front-facing camera and five megapixel shooter on the back, while a three megapixel unit handles front-facing duties. But nevertheless, we have this to say: the iPhone 3 G and 4 G connectivity as we traveled about this great nation.

    My homepage - sexchat

    ReplyDelete
  3. fantastic post, very informative. I wonder why the other experts of this sector don't understand this. You should proceed your writing. I'm sure, you've a huge readers' base already!



    Feel free to surf to my web page :: I found it

    ReplyDelete
  4. Thanks for this post. I deployed as per your post. thanks a lot

    ReplyDelete

Post a Comment

Popular posts from this blog

Tab Control in Asp.Net

Scenerio: I need your help in designing tab control in   asp.net .My requirement is I need a tab control in   asp.net (C#) like  for example goto my computer ,right click c drive and select properties.we get tabs like general,security etc....... like that i need to design one tab control(no need of any rightclick) in my web page and the database table columns should come as tabs and inseide the tab data of that particular column should come.   Example:Employee master tab1:Employee name.........his name in the tab tab2:Age.............his age tab3:Address........his address   Solution:   You can do this using a simple div <style type="text/css"> .tabs         {             position: relative;             height: 20px;             margin: 0;   ...

AI and Microsoft: Revolutionizing Efficiency in Nonprofit Organizations

  How AI and Microsoft Enhance Efficiency in Nonprofit Organizations In today’s fast-paced world, nonprofit organizations face unique challenges—limited resources, increasing demands, and the constant need to do more with less. But what if technology could be the game-changer they need? In my latest research paper,  "How AI and Microsoft Enhance Efficiency in Nonprofit Organizations" , I explore how cutting-edge technologies like Artificial Intelligence (AI) and Microsoft’s innovative tools are revolutionizing the way nonprofits operate. From streamlining administrative tasks to enhancing donor engagement and optimizing resource allocation, AI and Microsoft’s solutions are empowering nonprofits to focus on what truly matters—their mission. This paper dives deep into real-world examples, practical applications, and the transformative potential of these technologies. Whether you’re a nonprofit professional, a tech enthusiast, or simply curious about the intersection of technolo...

Social tagging overview in Sharepoint 2010

A tag is a word or phrase that identifies an individual piece of information according to a set of attributes or criteria. Tags make it easy to find and share information about a specific subject or task. Social tagging helps users categorize information in ways that are meaningful to them. Social tagging can improve the quality of search results by filtering against specific tags, and it can also connect individuals who want to share information with other users who have like interests. This article describes the social tagging features in Microsoft SharePoint Server 2010. This article does not describe how to configure social tagging features. It also does not discuss how to implement social tagging features as part of an overall social media strategy for an enterprise. About using social tagging features Social tagging features help users to share information and to retrieve relevant, high-quality content more efficiently. Such sharing encourages collaboration and b...