How to add generated code files in VS 2010 as dependent files?
07:49 25 Apr 2011

I am automating my project using T4 templates. For this, I have to write some repeated code using T4 template and some hand written code which should not be overwritten by the T4 template. I would like to add the generated code file as the dependent file of the handwritten file. I am following convention of class1.cs for handwritten file and class1.generated.cs for generated file. How can I add this generated file in the project as dependent file of class1.cs?

visual-studio-2010 code-generation t4