Prepare the Visual Studio project
Create an empty SharePoint 2013 project and add the appropriate dependencies for the project. Connect to your SharePoint 2013 instance. When you have created your project, you can deploy directly from Visual Studio to SharePoint. Or you can export a package, and then install the feature from SharePoint.
Considerations
To avoid surprises when deploying a custom control, take the following points into consideration:
- Ensure you have added the dynamic library dependencies to the General Cache Assembly (GAC) on the SharePoint server where you are deploying your custom control.
- It will greatly simplify the deployment and retracting process to Use Visual Studio to deploy or retract your custom control.
-
Verify that your account has access to the Nintex Forms database. Use Microsoft SQL Server Management Studio to verify that the your SharePoint development account has access to the NintexForms database.
- If you need to remove the control, first remove the control from the Nintex form where it has been placed using the Forms designer, and then remove the DLL from the GAC, and finally retract your solution from Visual Studio.
Prerequisites
To use the example, ensure that you have the following prerequisites in place:
- .NET Framework 4.5.2.
- A SharePoint development environment with Visual Studio installed on SharePoint 2013 On Premises.
- Nintex Forms 2013 and Nintex Workflow 2013 installed and configured on the SharePoint 2013 On Premises server.
- An account that is a member of the local administrator group and member of the Farm SharePoint Administrators Group so that you can create site collections, perform an IISreset, navigate through Central Administration, and deploy and retract SharePoint solution files.
Create an Empty SharePoint 2013 Solution in Visual Studio
In your Visual Studio development environment on your SharePoint 2013 server, create a new project and make sure that it points to SharePoint server to which you would like to deploy your solution.
To create an empty SharePoint 2013 Solution in Visual Studio
- Click File, click New, and select Project in Microsoft Visual Studio.
- Expand the Installed group, Templates, and then Visual C#. Click Office/SharePoint, and select SharePoint Solutions. Click SharePoint 2013 – Empty Project.
- Name the Project MyCustomSliderControland the click OK. You may want to add the solution to source control.
- Type the domain of the SharePoint site you use for debugging. Click Validate to verify the connection.
- Select Deploy as a farm solution and click Finish.
Add Library Dependencies
You will need to retrieve the following Dynamic-link library (DLLs) from your SharePoint Server after you have installed Nintex Workflow and Nintex Forms:
- Nintex.Forms.Sdk.dll
- Nintex.Forms.dll
You can find the Nintex assemblies in the General Assembly Cache (GAC).
Note: Access to members and types through the Nintex.Forms.Sdk namespace found in the Nintex.Forms.Sdk assembly. Direct access to Nintex.Forms members and types is only supported for infrastructure use.
To add the dependent class libraries for the solution
- Click open and select Project/Solution in Microsoft Visual Studio. Navigate to your solution file and click Open.
- Click View and select Solution Explorer.
- Expand the custom control solution, right-click the References node, and then select Add References.
- Click, Assemblies, and click Framework. Select System.Runtime.Serialization, System.Web, Nintex.Forms, Nintex.Forms.sdk, and click OK.