What's New

For a full change log of all the new features and bug fixes for each version of CodeSmith Generator be sure to look at the CodeSmith Generator Release Notes. For information on upgrading to the latest version please see the upgrade section.

CodeSmith Generator 8.0

CodeSmith Generator 8.0 now targets version 4.6.2 of the .NET Framework. As such support for Visual Studio 2010, 2012 and 2013 has been removed.

The installer no longer contains MSBuild support or Visual Studio Integration. If you are getting an error about a missing targets file, you’ll need to either remove the targets file from the project file or right click on your CodeSmith Generator Project File and under options remove Generate on Build and reenable it. This will remove the old targets file which is invalid and install the CodeSmith.Generator.Task NuGet package which will enable the Generate on build support.

  • Added support for C# 6 and VB 14 language features.
  • Added support for .NET 4.7. You can now reference  .NET 4.7 assembly references.
  • Added support for Visual Studio 2017. Visual Studio support can be installed as a VSIX from the Visual Studio marketplace and can be automatically updated.
  • Added official CodeSmith Generator NuGet packages for SDK scenarios.
  • Added new CodeSmith.Generator.Task NuGet package which enables generate on build functionality. This package also includes the cs.exe command line executable as well.
  • Added the ability to specify a license key via the Generator:License environment variable or in code CodeSmithLicense.SetLicenseKey(key). Allows for easy build server and CI usage.
  • Added High DPI support.
  • Added support for JavaScript merge regions.
  • Added support for <code> blocks to be used in doc comments to support rendering of code snippets within a summary section.
  • Added support for newer snippets that could contain shortcuts that begin with the # character.

CodeSmith Generator 7.1

  • Added support for Visual Studio 2015.
  • Added SchemaSelector to allow easier selection of schema objects.
  • Added new TypeScript templates.

CodeSmith Generator 7.0

  • Added support for Visual Studio 2013.
  • Added the ability to Control+Click to go to definition including support for the ability to open code behinds.
  • IntelliSense support for C# 5.0 and VB 11.0 syntax, Array Indexers, XML and XSD files.
  • Major User Interface Improvements including new Windows 8 (metro) themes.
  • Added Gang of Four Design Pattern templates (Contrib Martin Hart Turner).
  • Added a new SQLAnywhereSchemaProvider (Contrib Steven Hyde).
  • Added support for json serialization of schema objects.
  • Support for Block Selection, Bracket Highlighting, Delimiter Auto-Complete, and Curly Brace Auto-Indent.
  • Support for SQL Azure.

  • Added Syntax Highlighting for the following Languages: Assembly, INI, Lua, Markdown, MSIL, PowerShell, Ruby, RTF, VBScript, XAML.
  • Added support for Format Document and Format Selection.
  • Added file extension mapping for the following file types: ColdFusion, CoffeeScript, Command, Dart, Erlang, F#, JSON, LESS, TypeScript, XSD and XSLT.
  • Updated the code navigation drop downs by adding support for modifiers, method parameters and property parameters.
  • Added the ability to control the current theme from Generator Explorer.
  • Added the ability to reset the docking layout from Generator Studio.
  • Added the ability to open the options dialog from Generator Explorer.
  • Added method overloads to StringUtil IsPlural and IsSingular that allows you to specify a plural overrides MapCollection.
  • Added the ability to consume merged MapCollections. StringUtil.ToPlural() and StringUtil.ToSingular() now use merged a MapCollection.
  • Improved performance of parsing templates. Very large templates can see up to a 2500% improvement. NetTiers parsing is 30% faster.
  • Improved start up time of Generator Studio and Visual Studio integration.
  • New templates, including:
    • Bootstrap 3.0
    • TypeScript
  • Updated the CSLA templates to version 4.1 Beta.
  • Updated the PLINQO for LINQ to SQL templates to version 5.2.
  • Updated the PLINQO for Entity Framework templates to version 1.3.
  • Updated the PLINQO for NHibernate templates to version 1.3.
  • Updated the .netTiers templates to version 2.3.2.
  • Many other small improvements and bug fixes.

CodeSmith Generator 6.5

CodeSmith Generator 6.0

CodeSmith Generator 6.0 now targets version 4.0 of the .NET Framework. As such support for Visual Studio 2005 and 2008 has been removed.

CodeSmith Generator Studio has been removed! CodeSmith Generator 6.5 now includes CodeSmith Generator Studio.

CodeSmith Generator 5.3

  • Added support for Visual Studio 2010!
  • Renamed CodeSmith to CodeSmith Generator and updated product logos, license agreements and start page.
  • Updated the Microsoft Connection String Designers to the latest version.
  • Updated the SqlSchemaProvider to support Table UDT's as a ParameterSchema.
  • Added the SQLAnywhereSchemaProvider. This has been tested against Sybase IAnywhere 11.0.
  • Added the ISeriesSchemaProvider. Requires iSeries OS v5.4 or greater and has been tested against v6.1.
  • Added Flash support to the CodeSmith Generator Studio browser.
  • Added the ability to silently uninstall CodeSmith Generator using the /quiet flag.
  • Added initial support for GetExtendedProperties and GetCommandResultSchemas to the PostgreSQLSchemaProvider.
  • Updated the DbType and native type mappings in the PostgreSQLSchemaProvider.
  • Updated the ADOXSchemaProvider error handling to better support Microsoft Visual FoxPro 9.0.
  • Added the ability to save property enumerations that do not have a default value of 0 defined.
  • Added CS_IsUserDefinedTableType as an ExtendedProperty to the SqlSchemaProviders ParameterSchema object. This will return true if the type is a User-Defined Table Type.
  • Added support for Function-Based Indexes in the OracleSchemaProvider.
  • Added CS_IndexType and CS_ColumnExpression as an ExtendedProperty to the OracleSchemaProviders IndexSchema object. 
  • PLINQO - Updated to version 5.0.4
  • CSLA has been updated to version 3.0.2

CodeSmith Generator 5.2

  • Added Visual Studio 2010 Beta 2 Support (Beta).
  • Added option to the installer to choose a different sample folder.
  • Fixed a bug where the following error would occur: Unable to cast object of type 'SchemaExplorer.ADOXSchemaProvider' to type 'SchemaExplorer.IDbSchemaProvider'.
  • Fixed a bug where multiple licenses would not be deactivated during deactivation.
  • Added upgrade support for previous versions of CodeSmith.
  • Fixed a bug where an exception would be thrown when an invalid connection string would be passed into any connection string editor.
  • Fixed a bug where optional merged properties in a Class Library were not being marked as optional.
  • Fixed a bug where selecting a blank DataSource from a UI Picker would throw a NullReferenceException.
  • Added a detailed error message to FileNameEditor, it will now let the user know that there GetFileName override is throwing an exception.
  • Fixed an issue where the property grid would be blank but as soon as you clicked on the property it would appear.
  • Fixed a rare bug where CodeSmith Studio couldn't resolve a template's referenced assemblies on the very first load.
  • Fixed a bug where the Property Grid wouldn't refresh properties that had been changed in an assembly.
  • Fixed a bug where the Splash Screen would attempt to be closed during a race condition causing an Exception.
  • Fixed a bug where the Uninstaller would not close the registry key it opened.
  • Fixed a bug where a Required Property would be ignored when generating from CodeTemplateGenerator.
  • Added an option to the tool bar in CodeSmith Studio to add a new blank template.
  • Updated CodeTemplateGenerator to use the template cache when clicking the build button.
  • Fixed a bug where clicking Build in the CodeTemplateGenerator dialog would discard property data.
  • Added a notification to the CodeTemplateGenerator when generating a template that's OutPutType is set to none.
  • Added support for SQL Functions (table-valued and scalar-valued).
  • Added IncludeFunctions Property to SchemaObjectBase, setting this to true enables SQL Function support.
  • Fixed a bug in DatabaseSchemaSerializer where a changed property would never be changed back to true (DeepLoad).
  • Added Filtering support to all Command UI dialogs.
  • Added support to set the Command UI DataSource based on the IncludeFunctions property.
  • Fixed various memory leaks greatly reducing CodeSmith's footprint.
  • Fixed a bug where cached data would be deleted prematurely.
  • Fixed a bug where renaming a folder shortcut to a previous name would throw a NullReferenceException. 
  • Added overloads for CommandResultColumnSchema and ParameterSchema to GetVBVariableType and GetCSharpVariableType in the SQLCodeTemplate and VBSqlCodeTemplate.
  • Fixed a bug that prevented the Visual Studio Integration from unlocking referenced assemblies.
  • Fixed a bug where the Active Snippets configuration dialog was not working as expected.
  • Fixed a bug where the Active Snippets Configuration would throw an OutOfRangeException when arranging Arguments.
  • Fixed a bug where one could not activate CodeSmith inside of Visual Studio.
  • Fixed a bug where generating a file to a directory outside of the Visual Studio Solution would throw an exception.
  • Fixed a bug where closing Visual Studio during generation would throw a NullReferenceException.
  • Fixed a bug where an XML Namespace error would occur in Visual Studio when generating .NET 3.5 console applications.
  • Fixed a bug where Saving a Setup Project file during generation would throw a COMException.
  • Fixed a bug where the DataSource manager would throw an exception when loading up the VistaDBSchemaProvider.
  • Fixed a bug in the SQLSchemaProvider where the where logic of the command queries would return incorrect results.
  • Removed the permissions (id) check in SQLSchemaProvider GetCommand's queries.
  • Fixed a bug in the SQLSchemaProvider where GetCommandResultSchemas was not correctly handling temp tables.
  • Fixed a bug in the SQLSchemaProvider could throw a NullReferenceException on invalid extended table data.
  • Fixed a bug in the SQLSchemaProvider where connecting to a replicated database would cause a timeout to occur.
  • Fixed a bug in the PostgreSchemaProvider where multicolumn indexes were not handled correctly.
  • Updated the PostgreSQLSchemaProvider assembly references to the latest version.
  • Fixed a bug in the SqlCompactSchemaProvider where ROWGUIDCOL was not included in the GetTableColumns().
  • Fixed a performance bug in MySQLSchemaProvider, where DataReader.NextResult() or DataAdapter.Fill() would take 10-20 seconds to return data.
  • Fixed a bug in the OracleSchemaProvider where the HasExtendedPropertiesTable could return a false positive.
  • Updated the custom property examples: added a Collection and Drop Down example.
  • Updated the Command Wrapper templates to support SQL Functions as well they can be used in Visual Studio integration.
  • Added an HTML photo gallery example.
  • The Kinetic Framework - Updated to latest version.
  • CSLA - Updated to version 1.1.1.
  • PLINQO - Updated to version 4.0.
  • NHibernate - Updated to version 1.1.5.
  • Updated the CodeSmith documentation.
  • Various other minor changes.

CodeSmith Generator 5.1

  • Fixed a bug where removing a data source from Database Explorer wouldn't permanently remove the data source.
  • Fixed a threading error when removing a data source from Database Explorer.
  • Fixed a bug where CodeSmith would throw an exception when it couldn't access the systems registry.
  • Fixed a bug where Copy Properties would throw an exception when called on a unsaved template.
  • Fixed a bug where the SqlCompactSchemaProvider connection string builder class could corrupted additional connection string options.
  • Fixed a bug where the SqlCompactSchemaProvider timestamp/rowversion columns were returning a "rowversion" native type name, should be "timestamp".
  • Added CodeSmith Customer Improvement Program.
  • Various other minor changes.
  • Fixed a bug where Generate Outputs would throw an error if a Visual Studio Solution contained a Setup and Deployment project.
  • Various minor updates to Visual Studio's Integration.
  • Updated Visual Studio Integration to unlock assemblies after generation.
  • Fixed a bug where a CSP in Solution folder causes ERROR: Object reference not set to an instance of an object.
  • CodeSmith Studio now requires that .NET 3.5 SP1 to be installed. 
  • Fixed a bug where CodeSmith Studio would attempt to save a csp for a unsaved template. 
  • Fixed a bug where a NullReferenceException would be thrown when toggling the properties window when no template properties existed.
  • Fixed a bug where extracting mapping files could cause an exception.
  • Added Widening, Narrowing, Like, Let, CUInt, CULng, CUShort, and Operator to the VB.NET keyword list.
  • Added var to the C# keyword list.
  • Fixed a bug when using Intellisense and Math. or some variable names would throw an ArgumentOutOfRangeException.
  • Updated CodeSmith Options dialog's.
  • Added support to give feedback and send detailed error information from within CodeSmith.
  • Updated Menu in CodeSmith Explorer, Users can now view the mapping editor, submit feedback, help, or configure options.
  • Updated Manage Outputs and child dialogs to save the window dimensions.
  • Added IndexedEnumerable, this is used to smartly enumerate collections and get a IsEven, IsLast, IsFirst property.
  • Added Linq Querying support to all SchemaExplorer Collections.
  • Added MergeProperty functionality for parsing properties from a CodeTemplate that inherits from an assembly.
  • Added Insert Class Merge Strategy.
  • Added CodeParser.
  • Added support to detect an embedded SDK License.
  • CodeSmith Configuration no longer uses xml files.
  • Updated the documentation for IDbSchemaProvider and DataObjectBase.
  • Fixed a bug in OracleSchemaProvider where AllowDBNull would always be set to true for view columns.
  • Fixed a bug in OracleSchemaProvider where the TableSchema.PrimaryKeys collection wasn't being populated correctly.
  • Updated OracleSchemaProvider's configuration to be configurable via the options dialog.
  • Added SQL CLR Support to the SqlSchemaProvider. To see if a command is a CLR procedure check the "CS_IsCLR" extended property.
  • Fixed a bug in SQLSchemaProvider where an xml index would be set to null after upgrading a SQL Server 2005 database to SQL Server 2008.
  • Fixed a bug in SQLSchemaProvider where the ExtendedData query was missing the PropertyBaseType and Minor columns when querying SQL Server 2000 ExtendedData.
  • Added PostgreSQLSchemaProvider, SqlCompactSchemaProvider, SQLiteSchemaProvider, VistaDBSchemaProvider.
  • Updated .netTiers to version 2.3 RTM.
  • Updated PLINQO to version 3.0.
  • Added CSLA Beta templates.
  • Various other minor changes.

CodeSmith 5.0

  • Added a tab for editing variables in the CodeSmith Project settings dialog.
  • Made it so that any .csp variables are automatically used when there is a string matching the variable value in the property values.
  • Made it so that variables are automatically created for connection strings stored in .csp files so that the connection string isn't repeated.
  • Made schema explorer designers load their data sources async so that the UI would not lock.
  • Changed all SchemaExplorer designers to display in Object (Owner) format so that you can type the first couple letters to jump to the object you are looking for.
  • Added ability to override plural/singular forms of words to the StringUtil.ToPlural and StringUtil.ToSingular methods.
  • Added ability to specify Filter="SomeTableSchemaProperty" on ColumnSchema directives which will filter the list of columns in the designer based on the table selected in the specified property.
  • Added new RegisterReference method to CodeTemplate to indicate which assemblies your generated code relies on so that they can be automatically added in Visual Studio.
  • Added a menu item for managing data sources to the Visual Studio CodeSmith menu.
  • Various improvements to the OracleSchemaProvider including full extended property support.
  • Changed ColumnSchema designer to use a treeview so that all columns for all tables aren't loaded at once.
  • Added ability to deep load all schema information at once which results in huge performance improvements. This is used by setting the DeepLoad attribute on any SchemaExplorer property in your template. This would typically be used when you know you are going to use all of the schema information from a database.
  • Ability to use .net 3.5 features in templates including LINQ. This is accomplished by setting the CompilerVersion attribute on CodeTemplate to "v3.5".
  • CodeSmith Projects now have a single file output mode to generate all template outputs into a single file.
  • Added Ability to generate individual project outputs.
  • Made it so that files being generated from a CodeSmith Project are checked out of source control before being edited.
  • Improved the custom tool upgrade process so that it works 100% in all scenarios without having to make manual changes afterward.
  • CodeSmith Projects can now add files to Visual Studio as code behind files to other generated files.
  • CodeSmith Projects can now set a generated files build action.
  • Added ability to resolve assemblies located in paths relative to the template now using Path attribute. Looks in template folder and \bin folder by default.
  • Optimized template caching algorithm allows for much improved performance.
  • Templates use partial classes now so you can have partial class code behinds and have access to template properties from the code behind file.
  • Added GetPropertyAttribute and SetPropertyAttribute to CodeTemplate.
  • Property attribute values are added for any non-recognized attributes on Property, XmlProperty and CodeTemplate directives.
  • Re-organized all sample templates and projects into a more logical folder structure.
  • Added new NHibernate templates in both C# and Visual Basic.
  • Made various improvements to the Plinqo templates.
  • .netTiers updated to the 2.3 version of the templates.
  • Added VB versions of many sample templates and projects.
  • Included the latest version of the NuSoft framework templates.
  • Many other minor enhancements, performance improvements, and bug fixes.

CodeSmith 4.1

  • Auto property refresh when running your templates including SchemaExplorer objects and external XML sources. 
  • Added IDbConnectionStringEditor interface so schema providers can provide connection string editing interfaces.  A connection string editor was implemented for SqlSchemaProvider, ADOXSchemaProvider and OracleSchemaProvider.
  • Added Indexes and Keys to the SchemaExplorer tool window in CodeSmith Studio.
  • Added support for Visual Studio 2008 (Orcas).
  • Added NoWarn attribute to CodeTemplate directive to allow ignoring compiler warnings.
  • Added several new sample templates as well as source code for the SqlSchemaProvider.
  • Many other minor enhancements, performance improvements, and bug fixes.

CodeSmith 4.0

  • CodeSmith Projects (.csp) - This feature makes automating your code generation process really easy and consistent whether you are working from inside of Visual Studio 2005, MSBuild, Windows Explorer, a command line / batch file, or CodeSmith itself.
  • ActiveSnippets - Imagine Visual Studio 2005 snippets, but with the full power of CodeSmith available to execute any logic or access any complex metadata (including database schema and XML data) to control the output of your snippets.
  • CodeSmith Maps (.csmap) - This feature will allow you to create dictionary style maps of things like SQL to C# data type mappings.
  • .netTiers 2.0 - The .netTiers templates have been greatly enhanced and included with CodeSmith 4.0.
  • NHibernate Templates - NHibernate templates have now been included and are able to get you started with using NHibernate.
  • CSLA .NET 2.0 Templates - They latest CSLA .NET 2.0 templates have been included and are greatly improved.
  • DbSnapshot Templates - Script all objects and table data out from a Microsoft SQL Server database.
  • Extended Property Management - You can now manage schema extended properties inside of CodeSmith Studio.
  • Property Persistence - CodeSmith now remembers the property values from the last time you executed a template.
  • Greatly enhanced Visual Studio 2005 integration.
  • Support for running CodeSmith in non-admin accounts as well as in Vista UAC.
  • CodeSmith Studio
    • Many improvements have been made to the performance of the IDE.
    • IntelliSense has been improved (including ctrl-space support) in both templates and code behind files.
    • Added recent news items to the start page.
  • CodeSmith Explorer
    • Supports drag and drop to move/copy files.
    • Improved performance.
  • CodeSmith Engine
    • PropertyChanged event is now exposed on each template.
    • Added OnChanged attributes to Property and XmlProperty directives.
    • XmlProperty now stores a file reference to the source XML instead of the XML contents.
    • XmlProperty now shows the XML file name in the property grid and can be edited.
    • Added ContextData object to templates for storing various non-persistent state which is shared with sub-templates.
    • IPropertySerializer interface has been changed to give property serializers access to more contextual information.
    • Added a Initializing state to the template State enum.
  • SchemaExplorer
    • Improved handling of SQL Server BLOB DataTypes
    • Improved ParameterSchema meta-data in CommandParameterSchema now containing DefaultValue Schema Information. 
    • Ton of new system extended properties added to SchemaExplorer objects.
  • Many other minor enhancements, performance improvements, and bug fixes.

CodeSmith 3.2

  • Built and optimized for .NET 2.0 / Visual Studio 2005
  • CodeSmith MSBuild task
  • Numerous other minor improvements and bug fixes

CodeSmith 3.1

  • New help file
  • Numerous other minor improvements and bug fixes

CodeSmith 3.0

  • Completely re-written parser/compiler which is faster and correctly reports line numbers from the template instead of from the compiled template source. This results in a much nicer debugging experience.
  • XML support - There is now an XmlProperty directive that makes working with XML much easier. This directive will give you a strongly typed object model to work with if you provide an XSD schema or it will give you an XmlDocument instance if you don't. This feature combined with the new IntelliSense feature make working with XML a breeze.
  • Statement completion in CodeSmith Studio (similar to Visual Studio's IntelliSense)
  • Template caching.
  • New Register directive that makes working with sub-templates much nicer.
  • Console client has been improved to include a batch mode, setting properties from the command line, and the ability to use any merge strategy.
  • Merge strategies have been overhauled to be more extensible and can be setup to work with any language.
  • New PreserveRegions merge strategy has been introduced.
  • DbDocumenter templates have been overhauled to be a best-practices sample for 3.0.
  • Indented output rendering.
  • IPropertySerializer interface can be implemented to allow for serialization of custom property types.
  • New PreRender and PostRender methods that can be overridden in your templates.
  • Ability to auto-execute SQL scripts after generating them.
  • Ability to render to more than one TextWriter at a time.
  • Tons of other minor improvements and bug fixes.