So, I created an application for SharePoint 2010 and I needed to deploy it to our farm.  This was the first time I had to do this so it was quite the attempt to find out how to do it.  Once your application has been created in Visual Studio and you have been deploying it to your development web site on the same machine you are almost all the way there.

First, change your configuration from debug to release, then right click on your application name and click on “Package”.  This creates the WSP file and puts the files needed for the deployment.  A WSP file is actually just a .CAB file that has had the extension changed.   If you want to verify the files that are being moved and installed then just rename your file to *.cab and then open it with a cab viewer.  Most of the time you can just double click on it and Windows will show you the content.

Next copy the WSP file over to one of the servers on your SharePoint farm.  I always put this on the server that runs the Central Administration site.

Log into the server that has the WSP file on it and run the SharePoint 2010 Management Shell as an Administrator.  You can find this in the Start menu under Start/All Programs/Microsoft SharePoint 2010 Products/SharePoint 2010 Management Shell.   Just right click on it and Choose “Run as Administrator”.   If you don’t do this then the install will fail.

Once in the Management Shell type the following command.

Add-SPSolution -LiteralPath <The Path to your WSP File>

Without the <>’s, so for me that was

Add-SPSolution -LiteralPath C:\install\JobTicket_WSP\JobTicket_Application.wsp

 

 

 

This just adds the solution to your SharePoint 2010 installed solutions page within your Central Administration pages. It does not deploy the application to any of the servers on the site, or allow any of the applications to run it.

Once it is listed as a solution you can deploy the application to all of the servers in your farm.  from your Central Administration site click on System Settings and then Manage Farm Solutions, which is under the Farm Management heading.

Click on the solution name that you just added  and then click on Deploy Solution.  On the next screen you can leave everything as the default and deploy the solutions, or you can set a time as to when it will be deployed.  Since this was the first time I was installing the solution I wanted it out there now.  Once I hit deploy it took me back to the solutions page and the status of the solution was now “Deploying”.   I hit refresh a couple times and it then showed that the solution was deployed to my farm.

After that I was able to access all the pages of the application.

Tim