views:

12

answers:

0

I've tried to resolve assembly reference pains in my T4 template by moving code out into a helper method in the same assembly and namespace as my template, but T4 refuses to find my helper method.

The helper method:

namespace PocoGenerator
{
    public class EntityReflector
    {
        public static IEnumerable<PropertyInfo> GetPropertiesForTemplate()
        {
            var baseNameSpace = "";
            var assemblyName = "DataObjects";

The recalcitrant template code:

<# foreach(PropertyInfo prop in PocoGenerator.EntityReflector.GetPropertiesForTemplate()) { #>
public <#= prop.PropertyType #> <#= prop.Name #> {get; set; }
<# } #>