Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

We strive to ensure that CodeSmith Generator templates are 100% backwards compatible. However, in very rare circumstances we break backwards compatibility to progress the platform. When we do break backwards compatibility, we ensure that the benefits of breaking compatibility greatly outway out-way the benefits of not breaking compatibility. Please refer to this document when upgrading CodeSmith Generator to ensure that you have the smoothest experience possible.

...

UITypeEditor deprecation

UITypeEditors are marked as deprecated and will be removed in a future version. The property grid component we use is WPF and no longer supports Windows Forms UITypeEditors going forward. Our recommendation is to use the built in property grid editors.

Upgrading from CodeSmith Generator 6.0

In Generator 6.0, we introduced a new API's to compile templates using TemplateEngine. In Generator 6.5, we made some major improvements to the TemplateEngine, DefaultEngineHost and IEngineHost interface. These changes allowed us to support new features in memory content. It also allowed feature development without breaking the API. The section below covers any breaking changes that were made during these updates.

...

Please see the following table for all the changes that have occurred to the interface in the current version.

Generator 6.0Current ImplementationAction To TakeDescription
string GetFileContent(string)string GetContent(string, bool)Rename Method Overloads and add Boolean parameterThe name was changed to represent generic content and not specifically file content.

bool ContentExists(string)Implement MethodImplement method if you are inheriting the IEngineHost interface or wish to override the default behavior.

RegisteredContent RegisteredContentImplement PropertyImplement property if you are inheriting the IEngineHost interface.

Updates to DefaultEngineHost 

...

Please see the following table for all the changes that have occurred to the interface in the current version.

Generator 6.0Current ImplementationAction To TakeDescription
DefaultEngineHost(string)DefaultEngineHost(string)Validate BasePathThe constructor will now throw an ArgumentException if the passed in base path doesn't exist.
RegisterInMemoryContent(string, string)
Method has been removed.See the example below for more information on registering content.

If you were calling DefaultEngineHost.RegisterInMemoryContent as shown below.

...

It is recommended to update your existing CodeTemplateCompiler implementation to use TemplateEngine, but this is not required. Please see the SDK documentation for more information.

SchemaExplorer Type Converter changes

...

The SchemaExplorer API has been updated for the latest version of .NET. The previous version of SchemaExplorer was written on the .NET 1.0 run time and updated over the previous versions. In the current version of CodeSmith Generator, we rewrote SchemaExplorer to take advantage of generics, Linq and many other language features. The new API changes broke some existing templates that were explicitly using the GetEnumerator() method result. Previously, the GetEnumerator() method returned an interface specific to the type you were working with. Below is a break down of what GetEnumerator() previously returned and what currently returned.

Collection NamePrevious GetEnumerator() return typeCurrent GetEnumerator() return type
ColumnSchemaCollectionIColumnSchemaEnumeratorIEnumerator<ColumnSchema>
CommandResultColumnSchemaCollectionICommandResultColumnSchemaEnumeratorIEnumerator<CommandResultColumnSchema>
CommandResultSchemaCollectionICommandResultSchemaEnumeratorIEnumerator<CommandResultSchema>
CommandSchemaCollectionICommandSchemaEnumeratorIEnumerator<CommandSchema>
DataObjectBaseCollectionIDataObjectBaseEnumeratorIEnumerator<DataObjectBase>
DataSourceCollectionIDataSourceEnumeratorIEnumerator<DataSource>
ExtendedPropertyCollectionIExtendedPropertyEnumeratorIEnumerator<ExtendedProperty>
IDbSchemaProviderCollectionIIDbSchemaProviderEnumeratorIEnumerator<IDbSchemaProvider>
IndexSchemaCollectionIIndexSchemaEnumeratorIEnumerator<IndexSchema>
MemberColumnSchemaCollectionIMemberColumnSchemaEnumeratorIEnumerator<MemberColumnSchema>
ParameterSchemaCollectionIParameterSchemaEnumeratorIEnumerator<ParameterSchema>
SchemaObjectBaseCollectionISchemaObjectBaseEnumeratorIEnumerator<SchemaObjectBase>
TableKeySchemaCollectionITableKeySchemaEnumeratorIEnumerator<TableKeySchema>
TableSchemaCollectionITableSchemaEnumeratorIEnumerator<TableSchema>
TabularObjectBaseCollectionITabularObjectBaseEnumeratorIEnumerator<TabularObjectBase>
ViewSchemaCollectionIViewSchemaEnumeratorIEnumerator<ViewSchema>
Updating existing SchemaExplorer Collection GetEnumerator() code

...