Hello,
I would take a look at the BasicSamples\CSharp\CodeBehind.cst for other examples of using a custom class in your template. However to solve your issue, you need to make sure you have the assemblies referenced and the namespaces imported in your template that you are using.
Example:
<%-- Assembly References --%>
<%@ Assembly Name="SchemaExplorer" %>
<%@ Assembly Name="CodeSmith.BaseTemplates" %>
<%@ Assembly Name="CodeSmith.CustomProperties" %>
<%@ Assembly Name="System.Data" %>
<%-- Namespace Imports --%>
<%@ Import Namespace="SchemaExplorer" %>
<%@ Import Namespace="CodeSmith.CustomProperties" %>
<%@ Import Namespace="CodeSmith.BaseTemplates" %>
<%@ Import Namespace="System.Data" %>
Then set the SRC to your class file and inherits set to the class name (look at the CodeBehind.cst for reference).
<%@ CodeTemplate Language="C#" TargetLanguage="Text" src="SampleCustomProperties.cs" Inherits="main" Debug="False" Description="Template description here." %>
Thanks
-Blake Niemyjski