Deploying the Solution

Once you’ve created a new project from the Starter Kit templates, you’ll want to deploy it to your local development SharePoint farm to test it out. The first step is to set the Site Url in your Project Properties to point to a SharePoint web application.

 image

Deploying the Service Project

The Service project generated by the template is a Farm solution, with a single Farm-scoped feature that will auto-activate in Central Administration. You can choose to deploy the Service project to any web application on your development farm, but if you set your Site Url to the Central Administration web application, it will conveniently recycle the Central Administration application pool (necessary if you want to test changes made to the administration pages of the service application). Once the Site Url is set, you can right-click the project and choose Deploy.

To deploy outside of Visual Studio (to a non-local server), you can use the typical Powershell commands:

Add-SPSolution -LiteralPath "c:\pathtoyourwsp\yourprojectname.Service.wsp"
Install-SPSolution -Identity "yourprojectname.Service.wsp" -GacDeployment

Once deployed, you will see an activated Farm Feature in Central Administration’s System Settings > Manage Farm Features page:

image

This feature displays a Custom Action on the Central Administration’s Application Management page, with links to manage the various components of the service:

image

In addition to installing the Custom Action, the Farm-scoped feature also deploys the localization Resource files for the administration pages to the App_GlobalResources directory of the Central Administration web application. This is equivalent to running stsadm –o copyappbincontent, or Install-SPApplicationContent on the local server that the WSP was installed to.

NOTE: If you have Central Administration on more than one machine in your farm, you will need to run the above stsadm or Powershell command manually to deploy the resource files properly on the additional CA server(s). This is due to the implementation of the ApplyApplicationContentToLocalServer() method which only runs on the local server.

Deploying the Client Project

If you have chosen one of the templates with REST services, you will get an additional Client project that contains REST services that are deployed to _vti_bin (ISAPI mapped folder). This project is also a Farm solution, and contains no Features, only assets that are deployed to the SharePoint hive (and DLL to the GAC).

To deploy the client project from Visual Studio, set the Site Url to a development SharePoint web application, right-click the project, and choose Deploy.

To deploy outside of Visual Studio (to a non-local server), you can use the typical Powershell commands:

Add-SPSolution -LiteralPath "c:\pathtoyourwsp\yourprojectname.Client.wsp"
Install-SPSolution -Identity "yourprojectname.Client.wsp" -GacDeployment

Last edited Feb 12, 2013 at 12:53 AM by adamtoth, version 2

Comments

No comments yet.