问题
we know that asp.net .resx files have an custom tool for generating some c# code (ResXFileCodeGenerator).
I have an xml file and I want to set the custom tool property of that to a T4 file.
how can i bind T4 file to the xml file?
回答1:
You can do that with T4 Toolbox. Select the resx file in Solution Explorer and set the Custom Tool Template in the Properties window.
回答2:
Have a look at http://t4-editor.tangible-engineering.com/t4editor_features.html#Compare. There's a feature called "Add Code Generation Item Command" that might do the trick.
来源:https://stackoverflow.com/questions/14997308/how-can-set-the-custom-tool-property-of-an-xml-file-to-a-t4-file