T4 Toolbox - Referencing Class in Current Assembly

后端 未结 4 1680
佛祖请我去吃肉
佛祖请我去吃肉 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:23

    Reference it common way. Then check if assembly is loaded, if not - generate stub code (to make compilation possible; after compilation run T4 again, to genereate real code). And have unit test that could prevent stub code going to production.

提交回复
热议问题