Sitecore Rocks Archives - Harsh Baid https://www.harshbaid.in/tag/sitecore-rocks/ Sitecore & Microsoft Certified Software Engineer Sun, 29 Sep 2013 18:59:54 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.3 Code Generation using Sitecore Rocks and Visual Studio https://www.harshbaid.in/2013/09/23/code-generation-using-sitecore-rocks-and-visual-studio/ https://www.harshbaid.in/2013/09/23/code-generation-using-sitecore-rocks-and-visual-studio/#comments Mon, 23 Sep 2013 09:15:57 +0000 http://www.harshbaid.in/?p=655 Index Points Introduction Assumptions Code Generation Steps using Sitecore Rocks Image Guided Steps for Code Generation using Sitecore Rocks Conclusion Reference Links   Introduction This post will guide you on how to work with code generation using Sitecore Rocks. Assumptions You have already setup Sitecore site visual studio solution. If not then you may follow the steps […]

The post Code Generation using Sitecore Rocks and Visual Studio appeared first on Harsh Baid.

]]>
Index Points
  1. Introduction
  2. Assumptions
  3. Code Generation Steps using Sitecore Rocks
  4. Image Guided Steps for Code Generation using Sitecore Rocks
  5. Conclusion
  6. Reference Links

 

Introduction

This post will guide you on how to work with code generation using Sitecore Rocks.

Assumptions

Code Generation Steps using Sitecore Rocks

For Code generation using Sitecore Rocks the steps are:

  1. Setup the Sitecore site using .exe installer or Siteroot zip – available from Sitecore SDN.
  2. Setup Sitecore site in Visual studio solution – Creating .sln file.
  3. Install Sitecore Rocks (if not already installed).
  4. Connect the Visual studio solution with Sitecore site using Hard Rock web service exposed by Sitecore.
  5. Create new StronglyTypedItems file in Sitecore visual studio solution, extension will be .scx, with appropriate name – for example “CodeGenerationFile.scx”.
  6. Right-click on created file “CodeGenerationFile.scx” and execute the command ‘Run Custom Tool’ for code generation.

Note: Check YouTube video series linked in assumption section for information on how to install and setup Sitecore Rocks and Sitecore Visual studio solution.

Image Guided Steps for Code Generation using Sitecore Rocks

The visual steps for Sitecore Rocks code generation are as below:

sitecore codegen - create strongly typed items file
Create new file for Code generation
Right click on project > Add > New Item > Visual C# > Sitecore > Code Generation > select Strongly Typed Items > click Add
sitecore codegen - run custom tool
Run custom tool command to execute and generate code files
sitecore codegen - code generated in designer file
Verify the Code generated in CodeGenerationFile.Designer.cs file (File name may differ as per added file)

Conclusion

Code generation with Sitecore Rocks is very easy to follow. After generating code using Sitecore Rocks, developers may move the classes to relatively named class files by themselves or using command ‘Move class to file’ using ReSharper tool.

Reference Links

Do comment if you like this post or have any opinions.

The post Code Generation using Sitecore Rocks and Visual Studio appeared first on Harsh Baid.

]]>
https://www.harshbaid.in/2013/09/23/code-generation-using-sitecore-rocks-and-visual-studio/feed/ 4