CodeSmith Generator 6.0-Error Window Improvements

We have received lots of feedback on CodeSmith Generator 6.0, and we would love if everyone continued to provide feedback. We use the feedback you provide to determine the areas we spend resources on. One of the key areas that we worked on since the first beta of CodeSmith Generator 6.0 was on improving the error reporting experience. We found a few pain points along the way and have made improvements that left us with a great experience.

The first behavior that we noticed is that any errors that occurred were properly reported to the error window. But once you navigated to a new template and then back to the previous template, the new template errors would be the only errors present. The new behavior automatically updates the error window with any errors that occurred with the currently open template during compile time or run-time (validation). This allows you to work with multiple templates without stopping to recompile each template.

The second behavior we noticed in the past is that when a validation error occurred at run-time because a sub templates property wasn’t set by the master. We would present a dialog box that wasn’t helpful at all. Now, we will add a detailed error message as well as present you with the exact template line that called the Render method on which the sub templates property wasn’t being set.

We now present you with a detailed description of what error occurred as well as the line number and column where to start looking. This is a huge improvement over the previous versions.

The third behavior that we fixed dealt with focusing the Error Window. We found that the focus was lost right away which caused the Error Window to present itself and then disappear. This really caused for an annoyance when building templates.

The last behavior occurred if you generated a template within Visual Studio and it compiled fine but a validation error was presented (Required Property is missing), we would update the Error Window but do nothing else. We decided to automatically show the property window as well as the Error Window so you can set the required property.