title: Script does not exist in namespace. ScriptService could not be found
body: <p>I have been trying to get rid of three compiler errors for about a day now.</p>
  
  <p>The errors are as follows:</p>
  
  <pre><code>&gt; Error 1   The type or namespace name 'Script' does not exist in the
  &gt; namespace 'System.Web' (are you missing an assembly
  &gt; reference?)   D:\WebData\Intranet\depts\MSO\msow_reports\App_Code\SearchPract.cs  7   18  http://localhost/depts/MSO/msow_reports/
  &gt; Error 2   The type or namespace name 'ScriptService' could not be found
  &gt; (are you missing a using directive or an assembly
  &gt; reference?)   D:\WebData\Intranet\depts\MSO\msow_reports\App_Code\SearchPract.cs  14  2   http://localhost/depts/MSO/msow_reports/
  &gt; Error 3   The type or namespace name 'Script' does not exist in the
  &gt; namespace 'System.Web' (are you missing an assembly
  &gt; reference?)   D:\WebData\Intranet\depts\MSO\msow_reports\App_Code\SearchPract.cs  26  17  http://localhost/depts/MSO/msow_reports/
  </code></pre>
  
  <p>The project is a .net 3.5 project that I'm trying to import into Visual Studio 2010. I've tried both updating to .net 4 and leaving it as .net 3.5. My understanding is that Script and ScriptService should be in the System.Web.Extensions dll. Adding a reference to this assembly doesn't appear to work.</p>
  
  <p>Please note the following excerpt from my Web.config file:</p>
  
  <pre><code>&lt;compilation debug="true"&gt;
    &lt;assemblies&gt;
      &lt;add assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/&gt;
      &lt;add assembly="eWorld.UI, Version=2.0.6.2393, Culture=neutral, PublicKeyToken=24D65337282035F2"/&gt;
      &lt;add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
      &lt;add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/&gt;
      &lt;add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
      &lt;add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/&gt;
      &lt;add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
      &lt;add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/&gt;
      &lt;add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
      &lt;add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
      &lt;add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
      &lt;add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
      &lt;add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
      &lt;add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
      &lt;add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/&gt;
      &lt;add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/&gt;
      &lt;add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/&gt;
      &lt;add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/&gt;
    &lt;/assemblies&gt;
  &lt;/compilation&gt;
  </code></pre>
  
  <p>The unhappy code is the following:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Web.Services;
  using System.Data;
  using System.Data.SqlClient;
  using System.Configuration;
  using System.Web.Script.Services;
  
  /// &lt;summary&gt;
  /// Summary description for SearchPract
  /// &lt;/summary&gt;
  [WebService(Namespace = "http://tempuri.org/")]
  [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
  [ScriptService]
  // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
  // [System.Web.Script.Services.ScriptService]
  public class SearchPract : System.Web.Services.WebService {
  
      public SearchPract () {
  
          //Uncomment the following line if using designed components 
          //InitializeComponent(); 
      }
  
      [System.Web.Services.WebMethod]
      [System.Web.Script.Services.ScriptMethod]
      public string[] GetPracts(string prefixText, int count) 
  </code></pre>
  
  <p>I've tried adding System.Web.Extensions.dll  and System.Web.Extensions.Design.dll to the Bin folder, as well as the web.config file. The System.Web.Extensions assembly still doesn't show up in the Object Browser when browsing "My Solution." I'm assuming this is the crux of the issue. I don't have any idea what to try from here at this point.</p>
  
  <p>I wonder if I'm overlooking something obvious.</p>
  
  <p>Please let me know what other information I should provide.</p>