运行T4脚本定制工具RESX文件 [英] Run t4 script as custom tool for resx file

查看:254
本文介绍了运行T4脚本定制工具RESX文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个资源文件 MyResource.resx ,我想怎么改的 MyResource.Designer.cs 文件被生成。

我有一个接受的resx文件作为输入,并给了我所得到的变换,但是,我必须手动才能为它工作运行此T4。

一个T4脚本

我看到自定义工具属性的RESX文件的当前规范是 PublicResXFile codeGenerator ,我把它改为 TextTemplatingFileGenerator ,但只取得了Visual Studio的执行RESX就好像它是一个T4。

如何配置我的T4自动在我的资源运行时的资源被改变了吗?

解决方案

检查了这一点: AutoRunCustomTool 下载从Visual Studio库

从自述:

在安装扩展,您应该查看每个项目项物业新的运行自定义工具。只要编辑这个属性添加目标文件(S)的姓名(或名称)。而已!

目标的文件是你.TT文件

I have a resource file MyResource.resx, and I want to change how the MyResource.Designer.cs file gets generated.

I have a t4 script that accepts a resx file as input and gives me the resulting transform, however, I must manually run this t4 in order for it to work.

I see that the "custom tool" property for the resx file is currently specified as PublicResXFileCodeGenerator, I changed it to TextTemplatingFileGenerator, but that only made Visual Studio execute the resx as if it were a t4.

How do I configure my t4 to automatically run on my resource when the resource is changed?

解决方案

Check this out: AutoRunCustomTool or Download from Visual Studio Gallery

From the readme:

After you install the extension, you should see a new Run custom tool on property on each project item. Just edit this property to add the name(s) of the target file(s). That's it!

"target" files are your .tt files

这篇关于运行T4脚本定制工具RESX文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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