Custom Project Template: Is possible to use dynamic File Name in VS2010. RRS feed

  • Question

  • Hi, All

    Currently I'm using a custom project template in VS2010. This is a Class Library project with only one code file and vb Class. In the template, the code file name is "ClassName.vb", and inside the code file, the class name is "ClassName".

    When I create a new project with the project template, the project name will be like "XXX.YYY.ZZZ.MyClass". How should I edit the project template so the code file name and the class name will be replaced as "MyClass" automatically?


    Wednesday, July 18, 2012 7:06 AM


All replies

  • Hi,

    You can use Template Parameters to replace your class name.

    If you want to use project name you can use projectname parametter.

    More you can refer to:http://msdn.microsoft.com/en-us/library/eehb4faa.aspx

    Best regards,

    Ego [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Ego Jiang Friday, July 27, 2012 9:24 AM
    Thursday, July 19, 2012 5:44 AM
  • Hi,

    I will mark my reply as answer.

    Please unmark it, if you feel it is not the answer.

    Thank you for your understanding and support.
    Best regards,

    Ego [MSFT]
    MSDN Community Support | Feedback to us

    Friday, July 27, 2012 9:25 AM