CodeSmith 4.0 Beta

In case someone somehow failed to notice, I love CodeSmith.  As such I was thrilled to open my email the other day and encounter an invitation to participate in the CodeSmith 4.0 beta.  It's a closed Beta, so I can't share the binaries, but you can bet that over the next few days I will be sharing my thoughts as I dig into the new version.  That said, here is what the guys at CodeSmith Tools are bragging about in the new version:

 

  • CodeSmith Project support (.csp files).  This replaces property sets, the custom tool and the batch format.
    • CodeSmith Projects can be run from the command line, inside MSBuild, inside CodeSmith Studio, and inside Windows Explorer.
    • Inside of Visual Studio, any outputs that are generated will automatically be added to your project.
    • If you build your project and you have the "Generate On Build" option on, your outputs will automatically be re-generated even if you generate from the command line using MSBuild.
    • Progress dialog is shown when running from Windows Explorer.
    • GUI dialogs to easily manage your project file.
    • Easily add new outputs where you select a template and specify the property values.
    • You can also specify merge settings through the GUI to enable code merging support.
  • ActiveSnippet support.  This will allow you to type something like:  "tp Petshop.dbo.Orders" inside of Visual Studio and then hit the expand key (CTRL-E, CTRL-E by default) and it will expand out into a list of property getters/setters and member variables based on the fields and data types of the Orders table.
  • CodeSmith Map support (.csmap files).  This feature will allow you to create dictionary style maps of things like SQL to C# data type mappings.
    • Example: <%@ Map Name="CSharpTypeAlias" Src="System-CSharpAlias.csmap" Description="Maps system types to C# aliases." %> <%= CSharpTypeAlias["System.String"] %> = "string"
    • Ability to reverse the map and use the values as the map keys.  This is useful for doing reverse lookups.
    • Ability to return the key value if a corresponding map entry is not found.
    • Ability to return a default value if a corresponding map entry is not found.
    • Ability to manage maps inside CodeSmith Studio or from Windows Explorer.
  • Ability to manage database schema extended property values from inside of CodeSmith Studio.
  • XmlProperty support has been enhanced to handle more variations of XSD.
  • Template property values are saved for templates so that each
    time you run them, you donb_t have to reset the values manually.
  • .netTiers 2.0 templates are included in the install.
  • Added csxsd.exe to allow manually creating shared XmlProperty
    assemblies.
  • Ton of new system extended properties added to SchemaExplorer
    objects.
  • Bunch of performance improvements here and there throughout
    CodeSmith.
  • Bunch of bug fixes.