Wednesday, 5 November 2014

CONFIGURE VISUAL STUDIO 2012 PROJECT FOR SITECORE (v6.4 to v7.5)

CONFIGURE VISUAL STUDIO 2012 PROJECT FOR SITECORE (v6.4 to v7.5)


Steps to configure VS 2012 for Sitecore  (v6.4 to v7.5)

In Visual Studio 2010, to create a project and solution for a Sitecore installation:

  1. Open VS 2012
  2. Click File >> New >> Project :
  3. In the New Project dialog, select .NET Framework 4.5, 
  4. Select the ASP.NET Empty Web Application project model 
  5. Set Name to the name of the project (ProjectName), 
  6. Set Location to the path to the WebSite folder for the project (C:\inetpub\wwwroot\ProjectName\WebSite) 
  7. Uncheck >> the Create directory for solution checkbox
  8. Click OK.
  9. In Visual Studio, click File >> Close Solution.
  10. Move the Properties folder, the .csproj file, and the .csproj.user file from the subdirectory created by Visual Studio (C:\inetpub\wwwroot\ProjectName\Website\ProjectName) to the WebSite subdirectory (C:\inetpub\wwwroot\ProjectName\Website). 
  11. Delete the subdirectory created by Visual Studio (C:\inetpub\wwwroot\ProjectName\Website\ProjectName).
  12. Open Visual Studio and open the newly created .csproj file.
  13. In Visual Studio, delete the /Web.config/Web.Debug.config and the /Web.config/Web.Release.config file from the project.
  14. In Visual Studio, add references to /bin/Sitecore.Client.dll, /bin/Sitecore.Kernel.dll, and any other dependent assemblies that you use in every project. 
  15. Set the Copy Local property to false for each reference to an assembly in the /bin folder.
  16. In Solution Explorer double-click Properties, set a default Assembly name and a Default namespace, and select the appropriate .NET framework version for your version of Sitecore.
  17. To use the /layouts subdirectory and/or the /xsl subdirectory, Go to Solution Explorer, select the project, and then click the Show All Files button. 
  18. Right-click on each relevant subdirectory and then click Include In Project, 
  19. Right-click each of the individual subdirectories and files in that subdirectory and click Exclude From Project. Remember to clear the Show All Files button afterwards, or debugging from Visual Studio could fail.
  20. After build or while closing project, Visual Studio will prompt you to create a solution for the project. Save it as your choice.
Enjoy.......VS2012 with Sitecore...................

No comments:

Post a Comment