title: Upgrade to 4.0: The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)
body: <p>I recently upgraded my solution from .net framework 3.5 to 4.0. All good except it gives me some errors in my website project.</p>
  
  <pre><code>The type or namespace name 'Linq' does not exist in the namespace 'System' 
  (are you missing an assembly reference?)
  
  The type or namespace name 'Linq' does not exist in the namespace 'System.Xml'
  (are you missing an assembly reference?)
  
  The type or namespace name 'Script' does not exist in the namespace 'System.Web' 
  (are you missing an assembly reference?)
  </code></pre>
  
  <p>Here is what my web.config looks like:</p>
  
  <pre><code>&lt;add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
  &lt;add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
  &lt;add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/&gt;
  &lt;add assembly="System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
  &lt;add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
  &lt;add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
  &lt;add assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/&gt;
  &lt;!--vjslib is needed for Google Transit-related code--&gt;
  &lt;add assembly="vjslib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/&gt;
  &lt;add assembly="Infragistics35.WebUI.Shared.v10.2, Version=10.2.20102.1011, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/&gt;
  &lt;add assembly="Infragistics35.WebUI.UltraWebGrid.v10.2, Version=10.2.20102.1011, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/&gt;
  &lt;add assembly="Infragistics35.WebUI.UltraWebTab.v10.2, Version=10.2.20102.1011, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB"/&gt;
  &lt;add assembly="Infragistics35.Web.v10.2, Version=10.2.20102.1011, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB"/&gt;
  &lt;add assembly="System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/&gt;
  &lt;add assembly="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
  &lt;add assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
  &lt;add assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
  &lt;add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
  </code></pre>
  
  <p>Why is it not able to find LINQ reference when i say <code>using System.Linq</code> or <code>System.Xml.Linq</code>? What am i missing here?</p>
  
  <p>--Edit--</p>
  
  <p>This happens only in website project. Other class libraries work fine.</p>