T4 Toolbox - Referencing Class in Current Assembly

后端 未结 4 1632
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-19 08:48

I am writing a T4 script which reflects over certain classes and provides code generation based on them. The problem is that my script errors out, saying that the classes in my

4条回答
  •  青春惊慌失措
    2021-02-19 09:26

    I believe this is what Nicko and uosɐſ are looking for. Just change the "MyAssembly.CodeGeneration" to the name of the project with the T4 templates.

    <#@ assembly name="$(TargetPath)MyAssembly.dll" #>
    <#@ import namespace="MyAssembly.CodeGeneration" #>
    

提交回复
热议问题