none
System.Data.DataSetExtension reference problem in .net 4.0 RRS feed

  • Question

  • Hi,

    I've built a website using .net framework 2.0 and vs2k5.

    everything worked fine but I've decided to move to vs2k10 and .net 4.0

    When I try to compile the website I get the following error:

    Error 22 The type 'System.Data.TypedTableBase`1<T0>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. 

    I've added e reference to that dll on my website but I keep getting the same error.

    Any ideas?

    Monday, June 7, 2010 12:55 PM

Answers

  • Hi Michael,

    I think the problem will be  using System.Data.DataSetExtensions; If you add the reference in the project to System.Data.DataSetExtensions.dll (and you have according to the information you provided) using System.Data; will enable you to use the Extended APIs contained on DataSetExtensions.

    So use:

    using System.Data;

    If you want to be sure that DataSetExtensions is loaded in your project you can try something like:

     

     

    DataTable dt = new DataTable();

    dt.AsDataView();

    AsDataView is an API contained on DataSetExtensions and should be recognized when compiling.

    Please let me know if this helps.

    Juan


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, June 16, 2010 5:14 PM
    Moderator
  • Thanks, Juan.

    I figured out it by myself- just removed using System.Data.DataSetExtensions;  and it works.


    Michael Freidgeim, http://geekswithblogs.net/mnf/
    Saturday, June 26, 2010 11:39 PM

All replies

  • Hello,

    Can you provide the piece of code with the compile error? Also can you provide the properties from the reference? (Right-click on the Reference folder the System.Data.DataSetExtensions, and take the information such as Identity, Path, Resolved, Runtime Version, Strong Name, etc).

    Thanks,

    Juan


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Monday, June 7, 2010 5:16 PM
    Moderator
  • Hi,

     

    I am writing to check the status of the issue on your side.  Would you mind providing us with more detailed information about the issue? 

     

    If you need further assistance, please feel free to let me know.   I will be more than happy to be of assistance.

     

    Have a nice day!

     

     

    Best Regards,
    Lingzhi Sun

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, June 10, 2010 2:41 AM
    Moderator
  • I've converted .Net 3.5 WAP project to .Net 4.0 and getting

    error CS0234: The type or namespace name 'DataSetExtensions' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)

    on the line

    using

     

     

    System.Data.DataSetExtensions;

    Project references properties show

    C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.DataSetExtensions.dll

    Runtime version v4.0.30319

    version 4.0.0.0.

    Any ideas what is wrong?


    Michael Freidgeim, http://geekswithblogs.net/mnf/
    Wednesday, June 16, 2010 3:21 AM
  • Hi Michael,

    I think the problem will be  using System.Data.DataSetExtensions; If you add the reference in the project to System.Data.DataSetExtensions.dll (and you have according to the information you provided) using System.Data; will enable you to use the Extended APIs contained on DataSetExtensions.

    So use:

    using System.Data;

    If you want to be sure that DataSetExtensions is loaded in your project you can try something like:

     

     

    DataTable dt = new DataTable();

    dt.AsDataView();

    AsDataView is an API contained on DataSetExtensions and should be recognized when compiling.

    Please let me know if this helps.

    Juan


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, June 16, 2010 5:14 PM
    Moderator
  • Thanks, Juan.

    I figured out it by myself- just removed using System.Data.DataSetExtensions;  and it works.


    Michael Freidgeim, http://geekswithblogs.net/mnf/
    Saturday, June 26, 2010 11:39 PM
  • You need to add System.Data.Common and System.Data.SqlClient and not (system.Data.DataSetExtensions) as one may think.
    Tuesday, September 28, 2010 9:41 AM
  • I've noticed that projects had specific required 3.5 tag:

        <Reference Include="System.Data.DataSetExtensions">
          <RequiredTargetFramework>3.5</RequiredTargetFramework>
        </Reference>

    which caused compiler errors when change target to 4.0.

    It was required to remove System.Data.DataSetExtensions from the project and then add System.Data.DataSetExtensions 4.0 version.


    Michael Freidgeim, http://geekswithblogs.net/mnf/
    Friday, May 6, 2011 1:56 AM