Exercise 1: Creating a Feature with Common Resources
- If you haven’t already done so, run the batch file named SetupLabxx.bat, found in the c:\Student\Labs\xx_BestPractices\ folder, to create the new site collection that will be used to test and debug the code you will be writing in this lab. This batch file creates a new site collection at an URL of https://intranet.contoso.com/sites/Labxx.
- Start Visual Studio 2010.
- Select File » New » Project from the main menu.
- In the New Project dialog, select VisualC#/Visual Basic » SharePoint »2010 in the Installed Templates list.
- Select Empty SharePoint Project as the Project type.
- Ensure that the target framework is set to .NET Framework 3.5.
- Name the new project BestPracticesImages and click the OK button.
- When the SharePoint Customization Wizard, enter the address of the site you are using for this exercise: https://intranet.contoso.com/sites/Labxx/.
- Select to deploy the solution as a Farm Solution.
Click the Finish button.
- In the Solution Explorer, right click the Features node and select Add Feature from the context menu.
- In the Solution Explorer, right click the BestPracticesImages project node and select Add » SharePoint “Images” Mapped Folder from the context menu.
- In the Solution Explorer, inside of the Images folder, right click the BestPracticesImages folder and select Add » Existing Item from the context menu.
- Locate the file C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\Template\Images\delete.gif and add it to the folder.
- In the Solution Explorer, expand the Package node and double-click the Package.package node.
- In the Properties window (lower right side), locate the SolutionId property and copy the SolutionId property to Notepad for use later in the lab.(Note: your ID will be different from the one shown in the image below)
- DO NOT DEPLOY THE SOLUTION YET!
|
|