How to use types written inside my project?

Topics: API, General
Jul 4, 2011 at 10:07 AM

I've a web project wherein I've defined a person class. Suppose the project's name is t4TemplatePoc.Web, I import the reference into the content string:

<%@ reference t4TemplatePoc.Web %>

But I keep getting error saying.

Errors during compilation of template application domain TextTemplate TemplateDomain #1

I've included the stacktrace for more info:

Server stack trace: 
   at TextTemplate.TemplateLanguageHandlerBase.RewriteAndCompile(String language, IEnumerable`1 namespaceImports, IEnumerable`1 assemblyReferences, IEnumerable`1 codeParts, Type parameterType, String parameterName)
   at TextTemplate.TemplateProxy.Compile(String content, Dictionary`2 handlers, Type parameterType, String parameterName)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at TextTemplate.ITemplateProxy.Compile(String content, Dictionary`2 handlers, Type parameterType, String parameterName)
   at TextTemplate.Template`1.Compile()
   at TextTemplate.Template`1.Execute(T parameterValue)
   at t4TemplatePoc.Web.t4.ProcessRequest(HttpContext context) in C:\projects\t4TemplatePoc.Web\t4.ashx.vb:line 27
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)