dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Thread: C# Express 2008 and NET 3.5 errors!

  1. #1
    Join Date
    Nov 2007
    Posts
    38

    Angry C# Express 2008 and NET 3.5 errors!

    i've downloaded and installed C# Express 2008 on my PC, and wrote some database application program, it works fine on my PC.

    but when i run it on another PC, where this new C# 2008 was not installed i get an error...

    then i tried to change properties of my project, and select target platform NET 2.0 but during the compilation it gave me such kind of errors:

    Error 1 The type or namespace name 'TypedTableBase' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) C:\Documents and Settings\rvrustamov\My Documents\Visual Studio 2008\Projects\SWSDatabase\SWSDatabase\swsDataSet.Designer.cs 458 69 SWSDatabase



    any ideas of how can i solve this problem?

    thanks!



  2. #2
    Join Date
    Nov 1999
    Location
    Denmark
    Posts
    260

    Re: C# Express 2008 and NET 3.5 errors!

    havent varified myself that this is always the case but here goes
    http://www.codeguru.com/forum/showthread.php?t=441271

    one way to check for youself is to make an install project to your solution
    and see what dependencies it auto adds to the install

  3. #3
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,116

    Re: C# Express 2008 and NET 3.5 errors!

    Why would you possibly think that you could use V3.5 functionallity in an application you have specified as targeting V2.0???
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  4. #4
    Join Date
    Nov 2007
    Posts
    38

    Re: C# Express 2008 and NET 3.5 errors!

    i am not going to use 3.5 functionality! i did write simple database app with 2005 C#,... and used it..

    now i downloaded 2008...did the same from scratch.... it is also working! (cuz during install of 2008, 3.5 have installed automatically)

    but now i want to use this application (written with 2008) on another PC with only 3.0 or 2.0...

    i have no time to remake it ...is there a way of recompiling and including something which is not using 3.5 functions? thanks!

  5. #5
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,116

    Re: C# Express 2008 and NET 3.5 errors!

    If you have a reference to TypedTableBase<T> (which your error message states that you do), then you ARE using 3.5 Functionallity.

    See http://msdn2.microsoft.com/en-us/lib...58(VS.90).aspx
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  6. #6
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: C# Express 2008 and NET 3.5 errors!

    3.5 is free like any other .NET Framework. So if you are using any class from 3.5, you will need 3.5 on the system. It doesn't take much time to download and install it.

  7. #7
    Join Date
    Dec 2007
    Posts
    1

    Re: C# Express 2008 and NET 3.5 errors!

    (First time post)

    Automatically generated DataSet DataTable snippet

    3.5 : public partial class SubusersDataTable : global::System.Data.TypedTableBase<SubusersRow> {

    2.0: public partial class SubusersDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable {


    Notice that TypedTableBase is not part of the .NET 2.0 framework, but it is part of the .NET 3.5 framework.

    You can run into issues with the .NET build targets if you've upgraded a project from VS 2005 to 2008 - it will automatically regenerate the DataSets for 3.5, then when you try to target 2.0 again, you'll run into an issue.

    In your case, you created the auto-generated dataset in VS 2008, and it's been created with the .NET 3.5 database template. You can build your data-layer yourself (not the auto-magic Dataset templates), or you can find a way for VS 2008 to create the Dataset off of the .NET 2.0 template.


    I ran into this problem after upgrading an existing project to VS 2008 and simply copied the datasets from the non-upgraded VS 2005 project into the 2008 project and it built successfully.

  8. #8
    Join Date
    Feb 2008
    Posts
    1

    Smile Re: C# Express 2008 and NET 3.5 errors!

    After changing the target framework from 3.5 back to 2.0, my dataset designer wreaked of the 'typedtablebase' entries also. For my project, all I had to do to fix was right click each datatable and run through the configure wizard again. All my queries and relationships were fine. Recompiled fine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)