Problem compileing using linq
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 4 of 4

Thread: Problem compileing using linq

  1. #1
    Join Date
    May 2002

    Problem compileing using linq


    using System.Linq;
    using System.Xml.Linq;
    on an *.aspx.cs web page is standard in a C# ASP.NET website page generated by VS 2008. But if I port that page to my server, there occurs a compiler error when I try to access that page via the Internet (IE 8). Once the 'Linq' statements are commented out, the page works just fine.

    One thing I notice. The Web.config file on the local VS 2008 generated ASP.NET Website contains the following
                <add assembly="System.Core, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Data.DataSetExtensions, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Xml.Linq, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    whereas my server based Web.config file does not contain the 'System.Xml.Linq' assembly. Could that be the problem?
    Last edited by Mike Pliam; June 22nd, 2010 at 03:03 PM.

  2. #2
    Join Date
    Nov 2007
    .NET 3.5 / VS2008 Developer

    Re: Problem compileing using linq

    your web.config files should be the same. you should definitely have all of those assemblies in the web.config on the server.
    My Blog

  3. #3
    Join Date
    Dec 2007

    Re: Problem compileing using linq

    Might want to check out what version of the Framework you have installed on the server too.... making a reference to 3.5 objects (like LINQ) when FW2.0 is the only one installed will cause problems.

    * I don't respond to private requests for help. It's not conducive to the general learning of others.-I also subscribe to all threads I participate, so there's no need to pm when there's an update.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help - how to remove eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to???
    * On Error Resume Next is error ignoring, not error handling(tm). * Use Offensive Programming, not Defensive Programming.
    "There is a major problem with your code, and VB wants to tell you what it is.. but you have decided to put your fingers in your ears and shout 'I'm not listening!'" - si_the_geek on using OERN
    MVP '06-'10

  4. #4
    Join Date
    May 2002

    Re: Problem compileing using linq


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

This is a CodeGuru survey question.


HTML5 Development Center