Programming with .NET - Generalhttp://forums.silverlight.net//17.aspx/1?Programming+with+NET+GeneralGeneral discussions around authoring Silverlight .NET applications.Mon, 01 Jan 0001 00:00:00 -05001722721http://forums.silverlight.net//p/7332/22721.aspx/1?RegisterScriptableObject+problemRegisterScriptableObject problem <p>Attempting to develop a 1.1 app in C# and when using RegisterScriptableObject I get</p> <p>Error&nbsp;2&nbsp;'System.Windows.WebApplication' does not contain a definition for 'RegisterScriptableObject' and no extension method 'RegisterScriptableObject' accepting a first argument of type 'System.Windows.WebApplication' could be found (are you missing a using directive or an assembly reference?)&nbsp;<br> </p> <p>here is the code</p> <p>using System;<br> using System.Windows;<br> using System.Windows.Controls;<br> using System.Windows.Documents;<br> using System.Windows.Ink;<br> using System.Windows.Input;<br> using System.Windows.Media;<br> using System.Windows.Media.Animation;<br> using System.Windows.Shapes;<br> using System.Windows.Browser;<br> </p> <p>namespace TestSilverlight<br> {<br> &nbsp;&nbsp;&nbsp;&nbsp; public partial class Page : Canvas<br> &nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public Page() <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Register the scriptable endpoints <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WebApplication.Current.RegisterScriptableObject(&quot;basic&quot;, this); <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void Page_Loaded(object o, EventArgs e) <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;// Required to initialize variables <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InitializeComponent(); <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;}<br> &nbsp;&nbsp; }</p> <p>}</p> <p><br> &nbsp;</p> 2007-12-05T17:16:31-05:0022747http://forums.silverlight.net//p/7332/22747.aspx/1?Re+RegisterScriptableObject+problemRe: RegisterScriptableObject problem <p>I had a similar problem once. I started a new project and pasted the code in and it worked. I never checked to see if the problem was a missing reference or a project/solution property.</p> <p>Pete</p> 2007-12-06T00:48:39-05:00