Open visual Studio 2010:
1. Start SharePoint development tools in Visual Studio 2010.
2. On the File menu, point to New, and then click Project.
3. In Project Types, under Visual Basic or C#, select Empty SharePoint Project.
4. Type UserInterfaceActions as the project name. Click OK.
5. In the SharePoint Customization Wizard, select Deploy as a sandboxed solution. Click Finish.(give any SharePoint URL)
6. In Solution Explorer, right-click the UserInterfaceActions project, select Add, and then select New Item.
7. In the Add New Item dialog box, select the Empty Element template. Enter UserInterfaceActions as the Name.
8. Open the Elements.xml file.
Copy the following code inside the <Elements> tag.
<CustomAction
Id="RemoveEditItemButtonFromCalendar"
Location="CommandUI.Ribbon.DisplayForm"
RegistrationType="List"
RegistrationId="106"
>
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.ListForm.Display.Manage.EditItem" />
</CommandUIDefinitions>
</CommandUIExtension>
</CustomAction>
In Debug menu click “Deploy Solution”.
If you are in SharePoint server the Solution file Deploy automatically into the particular application.
Go to àSite Settings àSolutions(Under the Gallries)àActivate solution.
If solution not Woking Go toàsite SettingsàManage Site Features (Under the site Actions) àActivate Your Feature.
If your in different machine Follow below steps:
Go to the project Root folder (example:D\final\removeedit\removeedit\bin\debug)
Copy the .wsp file into the server.
Upload the WSP file to a site collection by using the user interface
- On the top-level site of the site collection, on the Site Actions menu, click Site Settings.
- On the Site Settings page, in the Galleries section, click Solutions.
- On the Solutions tab of the ribbon, in the New group, click Upload Solution.
- In the Upload Document dialog box, click Browse.
- In the Choose File to Upload dialog box, find the file share, click the WSP file, and then click Open.
- In the Upload Document dialog box, click OK.
The Solution Gallery – Activate Solution dialog box appears.
- In the Solution Gallery – Activate Solution dialog box, click Activate.
To upload the WSP file to a site collection by using Windows PowerShell
- Verify that you meet the following minimum requirements: See Add-SPShellAdmin. You also need to be a member of the SharePoint_Shell_Access role on the content database. For more information, see Add-SPShellAdmin and Get-SPContentDatabase.
- On the Start menu, click All Programs.
- Click Microsoft SharePoint 2010 Products.
- Click SharePoint 2010 Management Shell.
- At the Windows PowerShell command prompt, type the following command:
6. Add-SPUserSolution -LiteralPath <LiteralPath> -Site <SiteURL> Where:
· <LiteralPath> is the full path that includes the name, of the WSP file.
· <SiteURL> is the URL of the site collection.
The workflow is now deployed as a feature. However, before you can use the workflow, you must activate it for the site collection.
- At the Windows PowerShell command prompt, type the following command:
8. Install-SPUserSolution –Identity <Solution> –Site <SiteURL> Where:
· <Solution> is the name of the solution to activate.
· <SiteURL> is the URL of the site collection.
If solution not Woking Go toàsite SettingsàManage Site Features (Under the site Actions) àActivate Your Feature.
To activate the feature on a site by using Windows PowerShell
2. On the Start menu, click All Programs.
3. Click Microsoft SharePoint 2010 Products.
4. Click SharePoint 2010 Management Shell.
5. At the Windows PowerShell command prompt, type the following command:
Enable-SPFeature -Identity <Feature> -Url <URL>