none
Customise the MSDataSetGenerator output RRS feed

  • Question

  • Hi I have a number of XSD in my application and I like to add one line of code in to each of the New subs for the Table adapters in them, problem is if I change the code in the designer file it get overwritten when the table adapter is changed by the MSDataSetGenerator.

    is it possible to get the MSDataSetGenerator to add the line of code for me so when the designer file is regenerated or I add new table adapters the line of code is automatically there?

    failing that is there a way to override the New sub so that my changes are maintained?

     

    Regards Dagz

    Thursday, June 26, 2014 3:40 PM

Answers

  • Hello,

    >>is it possible to get the MSDataSetGenerator to add the line of code for me so when the designer file is regenerated or I add new table adapters the line of code is automatically there?

    This article should help you. It tells you how to generate code with custom generators:

    http://www.drewnoakes.com/snippets/W...rVisualStudio/

     You could easily call into the MSDataSetGenerator tool, parse the code, and replace where needed.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Dagz Friday, July 11, 2014 6:46 PM
    Friday, June 27, 2014 5:22 AM
    Moderator