Change existing files - add new template RRS feed

  • Question

  • Hello,
    Regarding the doc here that describes how to create an add new item template.

    I cannot find any info on how to modify a file that exists in the solution when you add a new item from my created template. In the example of a .net EF core api project I want to modify startup.cs and add some lines there to a specific method when I add a new new item using my custom new item template. Please provide any doc link, tutorial, video , sample that shows how to modify an existing source file when new item added.. Thanks

    Wednesday, November 11, 2020 1:01 AM

All replies

  • Hi baadshah-khan,

    Thank you for posting here.

    Since your question is related to creating item templates in Visual Studio, you can consider posting your question in the following forum.


    Thank you for your understanding.

    Best Regards,

    Xingyu Zhao

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, November 11, 2020 6:57 AM