Add static content
Adding static content to a CodeSmith Generator template is easy. Anything in the template that Generator doesn't recognize as code or a directive is copied directly to the output.
Paste the example AssemblyInfo.cs file into the template, after the CodeTemplate directive:
<%@ CodeTemplate Language="C#" TargetLanguage="C#" Description="Create an AssemblyInfo.cs file." %>
using System.Reflection;
using System.Runtime.CompilerServices;
//
// Created: 1/1/1973
// Author: Blake Niemyjski
//
[assembly: AssemblyTitle("User storage utility")]
[assembly: AssemblyDescription("Helps manage data in Isolated Storage files.")]
[assembly: AssemblyConfiguration("Retail")]
[assembly: AssemblyCompany("MegaUtilities, Inc.")]
[assembly: AssemblyProduct("StorageScan")]
[assembly: AssemblyCopyright("Copyright (c) MegaUtilities, Inc.")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("1.0")]
[assembly: AssemblyDelaySign(true)]
You can run this template now, and it produces output: the original file, unchanged, because the template has no dynamic content yet. Next, you make parts of it dynamic.
Next: Make the content dynamic