none
Saving Dataset Creates Duplicate Desginer.vb File RRS feed

  • Question

  • Hi, I am having trouble with my typed datasets, I don’t know if this is an Visual Studio IDE Bug or if it is just me being new to typed datasets.

     

    I have a typed dataset (well a couple of them in a Business Logic Layer). I added a couple of FillBy Methods and changed the partial classes as needed and all was fine.

     

    This morning however, when I opened up my Solution I got error messages saying that a whole bunch of methods was duplicated, on inspection I saw that the IDE created a duplicate .Designer.vb file. I deleted the duplicate file, but then the generated code for my custom fillby was lost. I right clicked the Fillby method and clicked on configure, and then on finish just to regenerate the code. When I saved the dataset it created the duplicate .designer.vb file again, resulting in all the duplicate errors again.

     

    Is there something I am missing, because I cannot get the Dataset to save to to the original .designer.vb file?

     

    Thanks in advance.

    Monday, April 14, 2008 5:56 AM

Answers

  • Hi Roy,

     

    Thanks for the reply, I have solved the problem, you can just delete both .Designer.vb (Generated Code) files from the project, right click the data set and click on "Run Custom Tool". This will regenerate the code and create just one file.

     

    Why The IDE creates duplicate files i do not know, but you it is safe to delete them and just regenerate them.

     

    Regards,

     

    Douglas

     

     

    Wednesday, April 23, 2008 1:11 PM

All replies

  • Hi Douglas Daniell,

     

     

    Based on my understanding, you have some trouble when using Typed DataSet. If I have misunderstood you, please feel free to tell me,thanks.

     

    Try to find the duplicated method and remove the methods you added or change their names. Maybe the names of your customer method are the same as the methods generated by designer.

     

    I think you should use the Untyped DataSet instead. That's enough for your need. Actually, the system will generate code for you when you use typed DataSet.

     

    About the difference between Typed DataSet and Untyped DataSet you can get it from the following URL

     

     

    http://msdn2.microsoft.com/en-us/library/8bw9ksd6(vs.71).aspx

     

     

     

     

    Hope this can be helpful to you !

    Regards,

    Roy Zhou

    Friday, April 18, 2008 5:17 AM
  • Hi Roy,

     

    Thanks for the reply, I have solved the problem, you can just delete both .Designer.vb (Generated Code) files from the project, right click the data set and click on "Run Custom Tool". This will regenerate the code and create just one file.

     

    Why The IDE creates duplicate files i do not know, but you it is safe to delete them and just regenerate them.

     

    Regards,

     

    Douglas

     

     

    Wednesday, April 23, 2008 1:11 PM
  • Douglas,

     

    Im getting the same thing here. Are you using the VS 2008 Trail?

     

    I started getting the problem when I added a new TableAdpater without using the Wizard to Configure the TableAdapter. (This TableAdapter of mine is join between a few tables.)

     

    I also used to delete the duplicate DataSet1.Designer.cs, but now when i add a new field in the database, re-configure its tableadapter, save and delete the duplicate, the new field' generated code lies in the duplicate and not the original. (Using the Run Custom Tool does the same as Save).  Thus any new field I add to my database, i cannot access.

     

    Maybe you have strugged some more and can help me?

     

    Thanks,

    Andre

    Friday, May 9, 2008 1:53 AM
  • Andre Truter said:

    Douglas,

     

    Im getting the same thing here. Are you using the VS 2008 Trail?

     

    I started getting the problem when I added a new TableAdpater without using the Wizard to Configure the TableAdapter. (This TableAdapter of mine is join between a few tables.)

     

    I also used to delete the duplicate DataSet1.Designer.cs, but now when i add a new field in the database, re-configure its tableadapter, save and delete the duplicate, the new field' generated code lies in the duplicate and not the original. (Using the Run Custom Tool does the same as Save).  Thus any new field I add to my database, i cannot access.

     

    Maybe you have strugged some more and can help me?

     

    Thanks,

    Andre



    I'm having the same problem. Has anyone found a solution?

    thanks,

    Luis
    Luis R. Lebron
    Tuesday, February 17, 2009 5:52 PM
  • I am also having the same problem with VS2008 SP1. has anyone found a solution?
    Friday, May 8, 2009 2:51 PM
  • I'm still having this issue. Has anyone come across a solution?
    Tuesday, June 2, 2009 5:06 PM
  • May be it is necessary to tryworkoing with some other programs? I had such a problem, too. I was recommended Clone Remover to solve this problem. I used it delete duplicate files duplicate music finder (http://www.fileutilityblog.com/archives/228). And now I solved my propgram. May be it will help you.
    Friday, June 26, 2009 11:30 AM