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

Thread: Problem compileing using linq

  1. #1
    Join Date
    May 2002
    Posts
    1,723

    Problem compileing using linq

    Including:

    Code:
    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
    Code:
              <assemblies>
                <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
              </assemblies>
    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 02:03 PM.
    mpliam

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

    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
    Posts
    234

    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.

    -tg
    * 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
    Posts
    1,723

    Re: Problem compileing using linq

    Thanks.
    mpliam

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.


Featured


HTML5 Development Center