Creating a custom master page in SharePoint 2013 using Visual Studio 2012

I have successfully created a custom masterpage for SharePoint 2013 using Visual Studio 2012. The process very similar to how it was done in SharePoint 2010. Here are the steps I did to create my custom masterpage:

  1. Open the 15 hive to directory “15\TEMPLATE\GLOBAL”
  2. Copy the “seattle.master” file (or the oslo.master file)
  3. Create a new directory on your C: and paste the file
  4. Rename the file to anything you want. (i.e. acme.master)
  5. Open Visual Studio 2012
  6. Create a new empty project
  7. Add a new module (2 files are created inside the module automatically.)
  8. Change the name of the module (i.e. MasterPage)
  9. Delete the sample.txt file that was created automatically by adding the module
  10. Add an existing file to the module. Browse to your new acme.master file and add it.
  11. Open the elements.xml file in the module.
  12. Change the <Module …> by adding “List=116″ and Url=”_catalogs/masterpage”
  13. Change the <File …> by adding Type=”GhostableInLibrary”
  14. Change the name of “Feature1” to something more useful (i.e. ProvisionMaster)
  15. Double click on Feature1 (now ProvisionMaster) and add custom text to the title and description.
  16. Double check that the project will deploy to the correct site collection URL by checking the “Site URL”
  17. Build your project
  18. Deploy your project
  19. Assuming everything went well your project should be successfully deployed.
  20. Open the destination site collection and go to the site settings. Check site features and double check that the solution was added and automatically activated.
  21. Open SharePoint Designer 2013
  22. Open the destination site where you deployed your new acme.master file
  23. In the left-hand vertical navigation in SPD click on the link “Master Pages”
  24. You should see your new acme.master file in the list
  25. Right-click on the acme.master file and click link “Set as Default Master Page”
  26. Ignore and click ‘OK’ when a pop-up message telling you that there is no associated html file to your masterpage.
  27. Navigate to your destination site in Internet Explorer to see your new masterpage

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s