views:

111

answers:

1

T4 did not work for C++ projects in Visual Studio 2008 since it did not use msbuild for C++ projects. (Yes there were workarounds) In Visual Studio 2010, C++ projects uses MsBuild, so do anyone know if C++ projects can use T4 in the same way as C# or VB?

+1  A: 

The main integration mechanism for T4 in C# and Visual Basic projects is the TextTemplatingFileGenerator custom tool. Although in Visual Studio 2010 C++ projects now use MSBuild, they still don't support custom tools. As a workaround, you could use T4 Toolbox, which allows you to put a .tt file in a C# or Visual Basic project and have the files it generates added to your C++ project automatically.

Oleg Sych