Project References?

  • Thread starter Thread starter Dave Veeneman
  • Start date Start date
D

Dave Veeneman

I know there must be a simple answer to this question. I just split a
Windows application into two projects; the original application and a class
library. I moved a number of classes to the class library project. I added a
reference to the class library project to the original application, but I
still can't reference the classes in the class library from those in the
original application.

What am I missing? Thanks.

Dave Veeneman
Foresight systems
 
library. I moved a number of classes to the class library project. I added a
reference to the class library project to the original application, but I
still can't reference the classes in the class library from those in the
original application.

What am I missing? Thanks.
did you add 'using' (for C#) or 'Imports' (for VB.NET) statements?

I assume that the library classes are grouped under certain namespaces
right? (or maybe one namespace). If for instance that namespace name is
MyNamespace and your class name is MyClass, then to reference it, you
either have to write:

MyNamespace.MyClass.

or

using MyNamespace; (Imports MyNamespace in VB.NET)

MyClass.

You still have to add references to the project as well.

Laimis
 
Found the problem. The reference wasn't effective until I had compiled the
library. Once I debugged and got a successful compile, the references worked
fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top