G
Guest
using Team Studio 2005
1. Create a new web site
2. Add a new class to the project
3. In the Page_Load handler of default.aspx.cxs, create a reference to the
new class
4. compile solution
Result: The type or namespace name 'TestClass' could not be found (are you
missing a using directive or an assembly reference?)
For example, here's my default.aspx.cs:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
TestClass tc = new q();
}
}
here's the class I created:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
/// <summary>
/// Summary description for TestClass
/// </summary>
public class TestClass
{
public TestClass()
{
}
}
I duplicated the same behavior using VB.NET.
In Visual Studio 2003, the above code compiled, in 2005, it does not. Why
not?
Thanks.
1. Create a new web site
2. Add a new class to the project
3. In the Page_Load handler of default.aspx.cxs, create a reference to the
new class
4. compile solution
Result: The type or namespace name 'TestClass' could not be found (are you
missing a using directive or an assembly reference?)
For example, here's my default.aspx.cs:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
TestClass tc = new q();
}
}
here's the class I created:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
/// <summary>
/// Summary description for TestClass
/// </summary>
public class TestClass
{
public TestClass()
{
}
}
I duplicated the same behavior using VB.NET.
In Visual Studio 2003, the above code compiled, in 2005, it does not. Why
not?
Thanks.