The Harlequin
The Harlequin

Reputation: 188

c# Error 1 The type or namespace name '' could not be found (are you missing a using directive or an assembly reference?)

I'm trying to make a DLL of a base class that is inherited by classes in another DLL and I'm getting the above error when I name the namespace and the class anything but the default name.

This is what I want it to look like:

namespace SportsBaseClasses
{
   class BaseClass
   {

It works when it looks like this:

namespace ClassLibrary1
{
   public class Class1
   {

I'm using the appropriate "using" and I have it added as a reference. I've looked up this question half a dozen times and no one else seems to have this problem. Thank you in advance for your help.

Upvotes: 2

Views: 4160

Answers (2)

jhyap
jhyap

Reputation: 3837

Or may be try

using ClassLibrary1.Class1

OR

using BaseClass = ClassLibrary1.Class1

Upvotes: 0

Daniel A. White
Daniel A. White

Reputation: 191058

Try making BaseClass public.

namespace SportsBaseClasses
{
   public class BaseClass
   {

Upvotes: 1

Related Questions