Consider the following scenario:Note In this error message, ClassName is a placeholder that represents the actual name of the class and Namespace is a placeholder that represents the actual namespace.
- You open a Windows Form solution in Microsoft Visual Studio 2010 by using the Visual C# language. A project in the solution has the following features:
- The project contains a Windows Form. The Windows Form is declared in a namespace that has four levels. For example, the Windows Form is declared in namespace A.B.C.D.
- The project references an assembly that contains the same namespace together with a child namespace. The child namespace includes only inaccessible types. For example, the child namespace includes inaccessible type A.B.C.D.X.ClassX.
- The project references another assembly that exposes a public control. For example, the project references public control A.B.C.X.Control1.
- You perform one of the following actions:
- You drag public control A.B.C.X.Control1 to the Windows Form.
- You remove the public control, and then drag it to the Windows Form again.
- You save the project, and then try to build the solution.
The type or namespace name 'ClassName' does not exist in the namespace 'Namespace' (are you missing an assembly reference?)