Deploy files to _layouts in SharePoint 2010
In this post we will see how to deploy custom aspx page in _layouts folder of SharePoint 2010′s 14 hive . This method however, can also be used for deploying other files such as .js,images or Css to 14 hive.
For e.g. see Add custom css file in _layouts Sharepoint 2010 to add a custom Css file in 14 hive STYLES folder.
Steps to add custom aspx page in _layouts folder in SharePoint 2010 -
1. Open the Visual studio and create an empty project “DeployAspxToLayouts”.
2. Next, select “Deploy as Farm solution”.
4. Once you add that, you will have a Layouts folder structure in your project. Next we will add our custom aspx page(existing or new) to the Layouts folder that got created in our project. For this example i am creating a new aspx file and adding it to my custom folder i.e. “DeployAspxToLayouts” which i created under my Layouts folder.
5. So to add a new aspx page, Right click on your custom folder “DeployAspxToLayouts” and click on “Add -> New Item”. Next, In Add new item menu under “General” tab select “Text file” and rename it. See the Screen below
7. Next, In solution explorer right click the Project and Build & Deploy.
Next lets look at how to deploy Custom css files to STYLES of 14 hive
Add custom css file to styles folder in _layouts Sharepoint 2010