Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Reference problem using System.Linq [modified]

Reference problem using System.Linq [modified]

Scheduled Pinned Locked Moved ASP.NET
csharphelpasp-netlinqcom
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jim Taylor
    wrote on last edited by
    #1

    I have an asp.NET 3.5 web project in C# that includes references to

    System.Core
    System.Data.Linq
    System.Xml.Linq

    and a page with the following test code ...

    var a = (from b
    in columns
    where b.IndexOf("IDENTITY") == -1
    select b).Single();

    The solution compiles, but when I run the application I get the following error ...

    Compilation Error
    Description: An error occurred during the compilation of a
    resource required to service this request. Please review
    the following specific error details and modify your
    source code appropriately.

    Compiler Error Message: CS0234: The type or namespace name 'Linq'
    does not exist in the namespace 'System' (are you missing an assembly reference?)

    Source Error:

    Line 15: using System.Text;
    Line 16:
    Line 17: using System.Linq;

    Can anyone help? EDIT: I've just found this page http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3114187&SiteID=1[^] It looks like I need to add the correct version of the references and add some information to the web.config file. EDIT 2: I've checked all the references and they are fine, now I get a different error ... CS1026: ) expected yet this works fine in a console application with exactly the same references!?

    Jim

    modified on Thursday, May 8, 2008 5:23 PM

    S 1 Reply Last reply
    0
    • J Jim Taylor

      I have an asp.NET 3.5 web project in C# that includes references to

      System.Core
      System.Data.Linq
      System.Xml.Linq

      and a page with the following test code ...

      var a = (from b
      in columns
      where b.IndexOf("IDENTITY") == -1
      select b).Single();

      The solution compiles, but when I run the application I get the following error ...

      Compilation Error
      Description: An error occurred during the compilation of a
      resource required to service this request. Please review
      the following specific error details and modify your
      source code appropriately.

      Compiler Error Message: CS0234: The type or namespace name 'Linq'
      does not exist in the namespace 'System' (are you missing an assembly reference?)

      Source Error:

      Line 15: using System.Text;
      Line 16:
      Line 17: using System.Linq;

      Can anyone help? EDIT: I've just found this page http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3114187&SiteID=1[^] It looks like I need to add the correct version of the references and add some information to the web.config file. EDIT 2: I've checked all the references and they are fine, now I get a different error ... CS1026: ) expected yet this works fine in a console application with exactly the same references!?

      Jim

      modified on Thursday, May 8, 2008 5:23 PM

      S Offline
      S Offline
      Sam Xavier
      wrote on last edited by
      #2

      I used to get a lot of errors about LINQ earlier. You need to re-create the references again for LINQ from following path: C:\WINDOWS\Microsoft.NET\Framework\v3.5

      Best Regards, Sam Xavier www.componentone.com

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups