Share via


Exercise 1: Creating a Feature with Common Resources

  1. 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.
  2. Start Visual Studio 2010.
  3. Select File » New » Project from the main menu.
  4. In the New Project dialog, select VisualC#/Visual Basic » SharePoint »2010 in the Installed Templates list.
  5. Select Empty SharePoint Project as the Project type.
  6. Ensure that the target framework is set to .NET Framework 3.5.
  7. Name the new project BestPracticesImages and click the OK button.
  8. When the SharePoint Customization Wizard, enter the address of the site you are using for this exercise: https://intranet.contoso.com/sites/Labxx/.
  9. Select to deploy the solution as a Farm Solution.
  10. Click the Finish button.

  11. In the Solution Explorer, right click the Features node and select Add Feature from the context menu.
  12. In the Solution Explorer, right click the BestPracticesImages project node and select Add » SharePoint “Images” Mapped Folder from the context menu.
  13. In the Solution Explorer, inside of the Images folder, right click the BestPracticesImages folder and select Add » Existing Item from the context menu.
  14. Locate the file C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\Template\Images\delete.gif and add it to the folder.
  15. In the Solution Explorer, expand the Package node and double-click the Package.package node.
  16. 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)
  17. DO NOT DEPLOY THE SOLUTION YET!