有没有办法让Visual Studio的运行和QUOT;把所有的模板"在成功构建? [英] Is there a way to get Visual Studio to run "Transform All Templates" upon a successful build?

查看:106
本文介绍了有没有办法让Visual Studio的运行和QUOT;把所有的模板"在成功构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有geneates基于这是我的项目中声明的其他code helpert code T4模板。正因为如此,我必须建立我的项目之前,我运行转换所有模板。是否有可能有转换所有模板编译成功后运行作为一个生成后事件?

I have a T4 template that geneates helpert code based on other code that is declared within my project. Because of this, I have to build my project before I run "Transform All Templates". Is it possible to have "Transform All Templates" run as a post-build-event upon a successful build?

推荐答案

一个简单的解决方案可能是修改模板洛杉矶的 T4 MVC 模板,以便它们自动标记自己作为构建脏(查看文档页面并搜索AlwaysKeepTemplateDirty了解详细信息)。你也许可以编辑自己的模板,让他们做同样的事情。

An easier solution may be to modify your templates A LA the T4 MVC templates so that they automatically mark themselves as dirty on build (check the docs page and search for AlwaysKeepTemplateDirty for details). You could probably edit your templates to have them do the same thing.

这篇关于有没有办法让Visual Studio的运行和QUOT;把所有的模板"在成功构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆