Build and deploy the custom control

You can deploy and activate your solution in two ways, either from Visual Studio or create a Feature package and then import the package into SharePoint.

Deploy and activate from Visual Studio

You will need your solution to have the SharePoint server as a target defined, and you will need to run a development environment on the server. This process will package, deploy, and then activate your feature.

To deploy and active from Visual Studio:

  1. Open the solution in Solution Explorer.
  2. Right-click the solution, and select Build.
  3. After the solution has been built, right-click the solution, and select Deploy.

Package, import into SharePoint, and activate

You can package your solution in Visual Studio, and then from SharePoint import the feature, and activate it. You may need to do this if your development environment is not on the SharePoint server.

Create a solution file from Visual Studio

Package your solution in Visual Studio and export as a Windows SharePoint file. WSP is a file extension for a solution file used by Windows. WSP stands for Windows SharePoint. WSP files are CAB files containing a set of features, site definitions, and assemblies that can be applied to a group of computers.

To create a solution file from Visual Studio

  1. Open the solution in Visual Studio:
  2. Right-click the solution, and then select Build.
  3. Right-click the solution, and then select Publish.
  4. Specify the location of the published package, and click OK.

The solution file (<namespace name>.wsp) to the location you specified.

Import your solution into SharePoint 2013

Import a WSP file to SharePoint to enable the feature.

To import your solution into SharePoint Server 2013:

  1. Select Site settings. You can find site settings under the gear in the SharePoint toolbar.
  2. Click Solutions under Web Designer Galleries.
  3. Click Upload Solution, and navigate to the location of the solution package, and click OK.
  4. Click Active in the Solution Gallery - Active Solution window.

Activate the Solution in the Farm

Navigate to the farm solutions and find the name of your solution and activate it.

To activate the solution in the farm

  1. On the Central Administration Home page, click System Settings.
  2. In the Farm Management section, click Manage farm solutions.

    The Solution Management page appears. Solution deployment status is indicated in the Status column; the Web applications to which the solutions are deployed are indicated in the Deployed To column.

  3. To deploy a solution to all content Web applications, do the following:
    1. Display the Deploy Solution page: Click the solution that you want to deploy and then click Deploy Solution.
    2. In the Deploy When? section, select Now.
    3. In the Deploy To? section, select All content Web applications.
    4. Click OK.
  4. To deploy a solution to the Central Administration Web application, do the following:
    1. Display the Deploy Solution page: Click the solution that you want to deploy and then click Deploy Solution.
    2. In the Deploy When? section, select Now.
    3. In the Deploy To? section, select the URL for the Central Administration Web application.
    4. Click OK.

Related information

Create a custom form control sample