I've just added a new UserControl to a project of user controls. I'm just using the default generated code without any editing. When I try to place the UserControl on a test page in a separate project, intellisense shows all of the user controls in my assembly except the one I just added. If I type the name of the user control it says it is not a known element. I've tried restarting VS, cleaning, and rebuilding in all different orders. How do I make VS recognize the user control?
ascx:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl1.ascx.cs" Inherits="CustomControls2.WebUserControl1" %>
ascx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace CustomControls2
{
public partial class WebUserControl1 : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
Test Page:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPage2.aspx.cs" Inherits="TestDriver.TestPage2" %>
<%@ Register Assembly="CustomControls2" Namespace="CustomControls2" TagPrefix="Test" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<Test:WebUserControl1 id="asdf" runat="server" />
</div>
</form>
</body>
</html>