.net - Automatically getting all assembly references in T4 -
is possible have t4 template automatically picks assembly references (and dependencies) of parent project?
all examples have seen use <#@ assembly #> or <#@ volatileassembly #> manually define references, example end having reference system.core both in project , template. want avoid duplication: want define references in project, not template.
this should add reference project itself, allow referencing additional assemblies in template, , shadow copy whenever necessary avoid assembly locking.
it seems this possible before vs2010, possible re-implement/restore behavior?
t4 did indeed pick project dependencies before vs2010. deliberately chose separate out design-time references runtime references in order separate concerns , better support using .net 4.0 in templates if being used generate code .net 2.0 project.
you similar pre-vs2010 making custom directive processor used host serviceprovider dte , walked solution/projects find references. quite bit of work though.
i'm interested know ties dependencies of project dependencies template needs. example, project uses winforms doesn't need winforms in template code. basics system.core in both, shared set doesn't seem large, duplication not significant problem.
do have large shared set?
Comments
Post a Comment