This article will help you deploy wsp to 14 and 15 hives in SharePoint 2013 using SharePoint product version.
SharePoint 2013 provides the backward comparability for sites that can be created in SharePoint 2010. This can be achieved with the help of files located in 14 hive. So whenever you install the SharePoint 2013 you will have 14 and 15 hives.
If you want to deploy the same
custom components for both SharePoint 2010 and 2013 sites you need to
use the SharePoint Product version defined in the solution manifest
The below figure represents the properties of the package of the solution. You can see that SharePoint Product version in the below figure is set to 15.0, so that means the solution will get deployed to 15 hive.
Please see the manifest details in below code snippet. I have changed the SharePoint Product version =14.0 so that it can be deployed 14 hive.
Note: You need to have different solution names and Ids for 14 and 15 hives that you want deploy.
Devendra Velegandla is a five-time recipient of Microsoft's Most Valuable Professional (MVP) award (2014-2019) for Office Apps and Services, Office Servers and Services MVP and SharePoint Server. He received the MCC award for his contributions in Microsoft MSDN/TechNet forums. He loves sharing articles, videos, and tutorial on SharePoint and Office 365.