Visual Studio Integration

In addition to the standalone user interface Template Explorer, CodeSmith Generator also offers integration with Microsoft Visual Studio. This integration takes many forms:

Template Explorer

To use Template Explorer from within Visual Studio, select Template Explorer from the Generator menu which is located between the Tools and Help menu. This will open the Template Explorer tool window. This window can be floating or docked, just like any other Visual Studio tool window.

Template Explorer has the same functionality in Visual Studio that it does as a standalone program.

Template Editor

The Generator Template Editor is now integrated seamlessly into Visual Studio (as pictured above). The editor features rich IntelliSense, auto completion, documentation capabilities, go-to-definition support and much more.

The Template Editor features rich IntelliSense and auto completion support just like Visual Studio. This allows you to increase productivity while developing templates.

The Template Editor also features Go-To-Definition support which will take you instantly to the identifier's definition via the Object Browser.

CodeSmith Generator Project Integration

CodeSmith Generator Projects can be used to generate code within your Visual Studio Projects.


ActiveSnippets can be used to generate snippets of code similar to Visual Studio's snippets except with the full power of CodeSmith Generator templates and the ability to use complex metadata like database schema and XML.

The ActiveSnippet shortcuts have been updated as there was conflicting key binding in newer versions of Visual Studio. It's now Control+Alt+G, Control+Alt+G 

You can easily name your snippets to quickly generate exactly what you want.

Running the snippet is very easy, all you need to do is press Control+Alt+G twice or select Generator -> Expand ActiveSnippet from the Visual Studio menu. 

Learn More

You can also check out this video tutorial to learn more!