locked
Vb.net Type Dataset is not defined... 102 Errors! RRS feed

  • Question

  • Hello all.  I have a VB.net winforms application that I have been working on for months that just produced 102 errors... All of them are similar to the errors that i pasted below and pertain to every dataset that is in the project (approx 35 datasets).  I have gotten this error almost daily but I have always been able to clean & rebuild the application and the errors goes away.  This time they won't go away... I have been searching for 2 days for a solution and have not been able to find anything.  It happens so often that i really have no idea what would be causing it.  Any help would be greatly appreciated!! I am at a standstill...

    ******************** Application Errors - 102 total errors...

    Error    102    Type 'RestoreSoft.Customer_DataSet' is not defined.   

    Error    104    Type 'RestoreSoft.Customer_DataSetTableAdapters.v2_CustomerTableAdapter' is not defined.   

    Error    110    'TableAdapterManager' is not a member of 'customer_Events_DataSetTableAdapters'.  

    ********************* Here are a few lines from one of the 'form designers' that have errors

        Friend WithEvents Customer_Events_DataSet As RestoreSoft.customer_Events_DataSet
        Friend WithEvents V2_Customer_EventsBindingSource As System.Windows.Forms.BindingSource
        Friend WithEvents V2_Customer_EventsTableAdapter As RestoreSoft.customer_Events_DataSetTableAdapters.v2_Customer_EventsTableAdapter
        Friend WithEvents TableAdapterManager As RestoreSoft.customer_Events_DataSetTableAdapters.TableAdapterManager
        Friend WithEvents Appt_DateDateTimePicker As System.Windows.Forms.DateTimePicker

    VB offers this solution when you hover over the error...

    Change this:

    RestoreSoft.customer_Events_DataSetTableAdapters.sched_TableAdapter

    To this:

    Global.RestoreSoft.customer_Events_DataSetTableAdapters.sched_TableAdapter


    Monday, November 5, 2012 8:32 PM

Answers

  • I opened the windows "restore to a previous version" and was able to find a copy that was saved a few days before i started having the issue.. I lost some work but it is much better than the alternative.  Thanks for your help though.

    Wednesday, November 7, 2012 4:41 PM

All replies

  • Try the Visual Basic IDE forum... it looks like a problem in your project, not in your code.


    Visual C++ MVP

    Monday, November 5, 2012 9:07 PM
  • Hello all.  I have a VB.net winforms application that I have been working on for months that just produced 102 errors... All of them are similar to the errors that i pasted below and pertain to every dataset that is in the project (approx 35 datasets).  I have gotten this error almost daily but I have always been able to clean & rebuild the application and the errors goes away.  This time they won't go away... I have been searching for 2 days for a solution and have not been able to find anything.  It happens so often that i really have no idea what would be causing it.  Any help would be greatly appreciated!! I am at a standstill...

    ******************** Application Errors - 102 total errors...

    Error    102    Type 'RestoreSoft.Customer_DataSet' is not defined.   

    Error    104    Type 'RestoreSoft.Customer_DataSetTableAdapters.v2_CustomerTableAdapter' is not defined.   

    Error    110    'TableAdapterManager' is not a member of 'customer_Events_DataSetTableAdapters'.  

    ********************* Here are a few lines from one of the 'form designers' that have errors

        Friend WithEvents Customer_Events_DataSet As RestoreSoft.customer_Events_DataSet
        Friend WithEvents V2_Customer_EventsBindingSource As System.Windows.Forms.BindingSource
        Friend WithEvents V2_Customer_EventsTableAdapter As RestoreSoft.customer_Events_DataSetTableAdapters.v2_Customer_EventsTableAdapter
        Friend WithEvents TableAdapterManager As RestoreSoft.customer_Events_DataSetTableAdapters.TableAdapterManager
        Friend WithEvents Appt_DateDateTimePicker As System.Windows.Forms.DateTimePicker

    VB offers this solution when you hover over the error...

    Change this:

    RestoreSoft.customer_Events_DataSetTableAdapters.sched_TableAdapter

    To this:

    Global.RestoreSoft.customer_Events_DataSetTableAdapters.sched_TableAdapter

    Monday, November 5, 2012 9:37 PM
  • Hi WaterDamageRestoration,

    Thanks for you post.

    As far as I know, it seems no other ways except you to deal with your application with source wizard again.

    Hope other members have suggestions to this issue.


    Mark Liu-lxf [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, November 6, 2012 8:50 AM
    Moderator
  • Thanks for the reply... Do you mean start from scratch with the datasource wizard with all datasets?
    Tuesday, November 6, 2012 12:41 PM
  • Try open your project file in notepad to check if you have assembly references when you should have project references. An assembly reference may be missing when you think it should be built from a project reference.


    Visual C++ MVP


    Tuesday, November 6, 2012 3:41 PM
  • Ok. I will take a look at it.  Thanks for the suggestion!
    Tuesday, November 6, 2012 7:20 PM
  • I opened up the project file using Notepad... I compared the project file with a backup that I made about a month ago.  Everything looks consistently the same when looking at them side-by-side...

    My project name is RestoreSoft.  Is there a conflict because of the naming? If so, why did the error(s) show up months into the project i wonder??  Thanks.  I pasted below a few lines of the XML from the project file...

    <OutputType>WinExe</OutputType>
        <StartupObject>RestoreSoft.My.MyApplication</StartupObject>
        <RootNamespace>RestoreSoft</RootNamespace>
        <AssemblyName>RestoreSoft</AssemblyName>

    Tuesday, November 6, 2012 7:26 PM
  • Delete all the bin folders under the projects in your solution, then rebuild. If you get an error like before, you probably have an assembly reference. Delete that reference and add a project reference, and repeat until your build succeeds from scratch. 

    Also check which project is included in the current build configuration



    Visual C++ MVP

    Tuesday, November 6, 2012 7:36 PM
  • Okay, again thanks for your help! I will give it a try.
    Tuesday, November 6, 2012 8:28 PM
  • I deleted the bin folder in Windows Explorer and loaded the application (and rebuilt) and the errors are still present..

    I am not sure what you mean when you said "you probably have an assembly reference"... Are you speaking of the references in the Application/Properties/References folder?  If so, how do you determine which reference needs to be deleted?

    Thank You.
    Tuesday, November 6, 2012 8:50 PM
  • An assembly reference is a project dependency on a file, you add one by selecting the browse tab in the add reference dialog. It can also be created if you delete a project from the solution and visual studio resolved a project reference to an assembly one using HintPath.

    If the assembly file is missing, you will see a yellow icon when you check the references in solution explorer and your build will fail. The way to resolve is either put the file back to where it was referenced from, or use a project reference to make sure the reference is always bind to project output no matter where the output folder is set to.



    Visual C++ MVP

    Tuesday, November 6, 2012 9:05 PM
  • Okay. I understand now... I checked the references and everything looks good.  I compared the references in the bad project with the ones in the copy that i saved a month ago and they all look good.
    Tuesday, November 6, 2012 9:19 PM
  • I have no idea what could be causing this.  As i said, it has happened before and I was always able to clean/rebuild and it fixed the issue...
    Tuesday, November 6, 2012 9:21 PM
  • Check if a project is excluded from the current build configuration. You will see "project not selected" in the build log.


    Visual C++ MVP

    Tuesday, November 6, 2012 9:26 PM
  • Okay. I will try it.
    Tuesday, November 6, 2012 9:27 PM
  • I only have 1 project in the application by the way.  I didn't see anything in regards to the project being excluded..
    Tuesday, November 6, 2012 9:32 PM
  • so when it errors out what is in Customer_DataSet.designer.cs?


    Visual C++ MVP

    Tuesday, November 6, 2012 9:40 PM
  • I actually went thru the Customer_Dataset.designer.vb and made the corrections that were suggested by VS... There are no errors there now.  VS suggested that i add Global in front of the Dataset name.

    Change this:

    RestoreSoft.customer_Events_DataSetTableAdapters.sched_TableAdapter

    To this:

    Global.RestoreSoft.customer_Events_DataSetTableAdapters.sched_TableAdapter

    The Customers_Form is still not visible though, i still get the error message...



    Tuesday, November 6, 2012 9:57 PM
  • You probably generated the designer file using a new version of dataset designer. 

    Right click the file and select run custom tools, or recreate the file in the command line using xsd.exe from the version of .Net framework SDK shipped with Visual Studio.



    Visual C++ MVP

    Tuesday, November 6, 2012 10:05 PM
  • Ok, let me take a look.  Thanks again for walking me thru correcting this issue.
    Tuesday, November 6, 2012 10:09 PM
  • I right-clicked the Customer_Dataset and ran the custom tool and i couldn't tell if anything happened or not. I cleaned/rebuilt and the errors are still there. 

    I entered "Customer_Dataset.xsd.exe" into the command window and it returned "command is not valid" using the Visual Studio 2010 command window.


    Tuesday, November 6, 2012 10:18 PM
  • What a nightmare!!
    Tuesday, November 6, 2012 10:18 PM
  • Before you right click on the xsd file and run custom tools, inspect the Properties window to confirm the CustomTool property. It should be "MSDataSetGenerator" (no quotes). After you run the custom tools, the last modified date of the designer file would change.

    You can also generate the designer file using xsd.exe in Visual Studio command prompt, the syntax is documented here.



    Visual C++ MVP

    Tuesday, November 6, 2012 10:25 PM
  • Ok. I figured i wasn't doing something right.  I will try it again. Thanks.
    Tuesday, November 6, 2012 11:14 PM
  • I ran the custom tools and checked the modified date and it did change.  Unfortunately the issue is still there.  I also ran it on the expenses_dataset and checked the date and that date also changed but that dataset is still listed in the errors...
    Tuesday, November 6, 2012 11:20 PM
  • I opened the windows "restore to a previous version" and was able to find a copy that was saved a few days before i started having the issue.. I lost some work but it is much better than the alternative.  Thanks for your help though.

    Wednesday, November 7, 2012 4:41 PM
  • WaterDamage...I have exactly the same problem in VS2010 and it is really difficult to search for matching problem descriptions.

    In my case, I have two projects in a Solution. The first project is a non-visual component and the second is just a testing forms app to test the non-visual component. I can drop the non-visual component on the form from the toolbox, compile, no problems.

    Now, in the non-visual component project, I add a typed dataset from an MSSQL datasource.  The .XSD files are all fine and look great in the data set designer.

    I can also drop the dataset from the toolbox on the form's designer surface in the second project, it shows up in the form's tray in the form's designer, compile, no problem.

    But, if I drop the (same) dataset from the toolbox onto the non-visual component's designer surface, (which also has other non-visual components on it) I get the same error as you do, and the same fix fixes it.  Natualy this is a pain since any time the non-visual's surface is changed the code gets regenerated and the error comes back.

    Is this an IDE bug?

    TTB

    Wednesday, November 21, 2012 8:39 AM