Share via


Visual Studio 2015 for SharePoint 2016: Create Custom Action Group

Introduction:

In this post, we will discuss how we can create a custom action group using visual studio 2015 in SharePoint 2016. We will create inside the Site Settings page.

Steps:

Follow the below steps:

Open Visual Studio 2015 -> New Project. Then Choose SharePoint 2016 – Empty Project.

Then in the next dialog box, give an URL and choose farm solution.

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/create-custom-group-visual-studio-2015.png

Now add one Empty element to the project.

Right click on Project -> Add New Item and then choose Empty Element like below:

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/create-custom-group-visual-studio-2015-sharepoint-2016.png

 

By default it will be an empty element. Add the below code here:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
 <!-- Add a Custom Group "Master Page Look And Feel" under Site Actions -->
 <CustomActionGroup Description="Custom Group"
 Id="CustomgroupAction"
 Location="Microsoft.SharePoint.SiteSettings"
 Sequence="100"
 Title="Custom Action Group">
 </CustomActionGroup>
 
 <!-- Add a Link under the Group "Master Page Look And Feel" in Site Actions -->
 <CustomAction GroupId="CustomgroupAction"
 Id="UserInterfaceCustomActions.SiteSettings"
 Location="Microsoft.SharePoint.SiteSettings"
 Sequence="20"
 Title="Go to EnjoySharePoint.com">
 <UrlAction Url="http://www.enjoysharepoint.com" />
 
 </CustomAction>
</Elements>

 

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/sharepoint-2016-create-custom-group-visual-studio-2015.png

Now right click and deploy. Once it is deployed successfully. Go to the Site Settings page and you can see a section must be added like below:

 

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/sharepoint-2013-create-custom-group-visual-studio-2015.png

References:

Also read:

Conclusion:

Here we saw how we can create custom action group using visual studio 2015 in SharePoint 2016.