Using third party DLL in SharePoint 2013 solutions

When working with SharePoint solutions, sometimes there is a requirement to use third party DLLs in SharePoint solutions (Eg. Telerik, CuteUploader, etc). Here we will discuss the steps to use third party DLLs in SharePoint:

  1. Copy the DLL in bin directory of SharePoint web application.
  2. Open Visual Studio 2012/2013, create SharePoint empty project as farm solution.
  3. Add visual webpart in this project.
  4. Add reference of third party DLL in this project.
  5. After adding the reference of the DLL, deploy the project in SharePoint environment.
  6. Register the tag of third party DLL in visual webpart ascx page.
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
  7. Place the controls of third party DLL in visual webpart.

Note : Do not register the tag of third party DLL in visual webpart just after adding the reference (Step 4). First deploy the project otherwise the *.g.cs file will not get generated.