Reputation: 19862
There is a UserControlA
which was already developed when I joined on a project. It is in a Project which I will call MyProjectWeb
and it's namespace is MyProjectWeb.Common
.
namespace MyProjectWeb.Common
{
public partial class UserControlA : System.Web.UI.UserControl
{
...
There is another WorkFlowManager project that contains a class file which accesses this UserControl1.
MyProjectWeb.Common.UserControlA myUserControlA = (MyProjectWeb.Common.UserControlA)WizardControl.FindControl("TabContainer5$tpSomething$UserControlID");
Note: WorkFlowManager and MyProjectWeb are in the same solution.
This works completely fine. And now I want to create another UserControl which is UserControlB.
I followed the exact same thing.
namespace MyProjectWeb.Common
{
public partial class UserControlB : System.Web.UI.UserControl
{
But to my surprise, I cannot create an instance of UserControlB in the same code file in WorkFlowManager. MyProjectWeb.Common namespace does not even contain a UserControlB. When I compile I get obviously get a
The type or namespace name 'UserControlB' does not exist in the namespace 'MyProjectWeb.Common' (are you missing an assembly reference?)
Why is that I can reference UserControlA but not UserControlB which are in the same namespace from the WorkFlowManager cs file? If I access the MyProjectWeb.Common namespace anywhere inside the MyProjectWeb, I can see both the user controls. Anywhere to look for errors?
I am using Visual Studio 2005 with ASP .NET 2.0
Upvotes: 0
Views: 432
Reputation: 49185
It would depend upon how WorkFlowManager project references MyProjectWeb dll. If both projects are in same solution, then it should have been a project reference but you need to verify it. If the reference is made to dll file then you need to see where exactly the referenced file is stored - my guess is that WorkFlowManager project is referencing a private copy of MyProjectWeb dll that obviously does not get updated when you rebuild MyProjectWeb.
Upvotes: 1
Reputation: 13655
I'd have to look at the project to know for sure, what you're saying above doesn't tell me quite enough.
Quick ideas:
Upvotes: 1