Category Archives: Tips & Tricks

Introduction to CodeSmith Project Files

Introduction to CodeSmith Project Files Overview A new feature in CodeSmith 4.0 is the ability to manage groups of CodeSmith templates and their outputs with a single file called a CodeSmith Project. CodeSmith Projects enable you to define and run an entire code generation process quickly and easily using the environment of your choice. They …Read More

Tips & Tricks: Merge Strategies

Using merge strategies in CodeSmith enables you to combine both user and machine generated code in a single file. You can also regenerate the machine generated code while still preserving your custom code modifications. CodeSmith comes with two types of merge strategies out of the box: · InsertRegion – Allows you to insert a region …Read More

Tips & Tricks: ActiveSnippets

CodeSmith 4.0 delivers strong integration within Visual Studio and ActiveSnippets are a driver toward increasing developer productivity. ActiveSnippets, at a high level, are CodeSmith templates with exposure to the entire .Net Framework which you can utilize with a few keystrokes inside of Visual Studio 2005. The output of your ActiveSnippet will be rendered right where …Read More

Tips & Tricks: CodeSmith Maps

CodeSmith Maps allow developers to reduce the amount of plumbing code in their templates and increase the readability and re usability at the same time. Maps provide a named dictionary like semantic to template development. While developing templates, a common scenario developers face is accessing a lookup list based on some sort of information. A …Read More