Avoid TFS check out of project on template generation RRS feed

  • Question

  • Hi,

    I have made a template that generates multiple output files in an other project of my solution (it only checks out the needed files). But it checks out the project containing my template.

    - Project 1

         - Folder

             -> generated classes

    - Project 2

         - Template

         - Xml Descriptors read by template

    So using this structure of files and projects, it should check out only generated files but it checks out project 2 also. It's due to the fact that the template file has an output. If I write an output to a .txt extension, the ".tt" file is checked out. If I write an output to "\\" (workaround to avoid the generation of a file under the .tt file) then it's the project that is modified.

    I would like to know if it's possible to avoid the project 2 check out because I only generate classes into project 1 ?


    Monday, January 21, 2013 1:16 PM

All replies

  • Hi,

    Thank you for posting in the MSDN Forum.
    I will involve some experts into this issue to see whether they can help you out. There might be some time delay, appreciate for your patience.
    Thank you for your understanding and support.
    Best regards,

    Ego [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, January 22, 2013 7:55 AM
  • I'm not terribly familiar with text templates, but if you have a relatively simple repro you can share out, I'd be more than happy to take a look and see if there's a way to work around this behavior.


    Ed Dore

    Wednesday, January 23, 2013 9:21 PM
  • Hi,

    Sorry for the delay, I was very busy last days.

    Here is a sample project : http://zaxworld.free.fr/GeneratedClasses.zip

    You will find 2 projects :

    - Generated Classes is where the T4 template will save generated code

    - Templates is where the templates are

    So, to reproduce the issue :

    - Add this solution to a team foundation team project.

    - Check in all

    - Execute Generation1.tt template => it will check out the Generation1.tt file (it's ok because the output extension is set to .txt so it writes into a Generation1.txt file (which is the children item of Generation1.tt file)

    - Check in all

    - Execute Generation2.tt template => it will check out the "Templates" project. It is due to the fact that I set the output extension to "\\" to avoid the check out of the .tt file (like the case with Generation1.tt).

    I would like to be able to generate my template that will create my files into the "GeneratedClasses" Project without checking out any files into Templates project nor the project itself.

    Is it possible ?


    Thursday, February 7, 2013 8:58 AM