Tried to upgrade a .NET 2.0 web site project in VB to 4.5.2 and that broke compilation with the errors
BC30002 Type 'ScriptManager' is not defined.
BC30002 Type 'System.Web.Script.Services.ScriptMethod' is not defined.
BC30002 Type 'System.Web.Script.Services.ScriptService' is not defined.
Tried Import System.Web.UI
but it did not work and there was a warning that the import was unnecessary. Same with System.Web.Extensions
.
The first error occurs on the line:
Public ReadOnly Property ScriptManagerObject() As ScriptManager
Get
Return Me.ScriptManager1
End Get
End Property
The member is defined in ASPX as
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="AutoComplete.asmx" />
</Services>
</asp:ScriptManager>
What should I do to point the compiler at the correct namespace for ScriptManager
etc?
EDIT:
Tried adding this line to the ASPX page:
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web"%>
Did not work.
Tried adding a reference to System.Web.Extensions
for 4.0 framework. Did not work.
Tried deleting the ScriptManager1
object from ASPX and re-adding it from the Toolbox under the same name. It is still not found as a member of the page's class. How can we solve this mystery?