C# Error CS7000 – Unexpected use of an aliased name

C# Error

CS7000 – Unexpected use of an aliased name

Reason for the Error & Solution

Unexpected use of an aliased name

Examples

The following sample generates CS7000 because the alias qualifier (::) is not supported in a namespace declaration:

using N = ClassLibrary1;

namespace N::A
{
    public class Goo
    {
    }
}

To correct this error

Either remove the unsupported use of the alias in the namespace declaration:

namespace A
{
    void Goo()
    {
    }
}

Or, replace the alias with the fully qualified name:

namespace ClassLibrary1.A
{
    void Goo()
    {
    }
}