Asp – VS2008 targeting ASP.net 2.0: Project-level imports warning

asp.netvb.netvisual-studio-2008

I have a web app built against asp.net 2.0, but keep getting the following warning:

Namespace or type specified in the project-level Imports 'System.Xml.Linq' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.

I cannot find anywhere that actually Linq is actually referenced. I've even opened up the .vbproj in a text editor, and it's not hidden in there either.

Any ideas where this is set?

Best Answer

Open your web.config and remove the reference to Linq in there. You should need to delete these lines from under the "assemblies" section:

        <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Data.DataSetExtensions, 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.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>