I have a big solution with 10-20 projects in it, and I am an advanced user of VS 2010. I have VS 2010 and the customer's system is Windows 7, 64 bit. I have Visual Studio 2010 Service Pack 1.
Anyhoo, I have this one class library project (DLL) and it has an interface that is declared
public
, like so:
namespace MyNamespace {
public interface MyInterface {
void Foo();
}
}
And I have a class in the same project:
namespace MyNamespace {
public class MyClass : MyInterface {
public void Foo() {
}
}
}
And this class library project builds successfully. I am under .NET Framework 4 as my framework. No .NET Framework 4 Client Profile, none of that -- the full version.
Now I have another C# class library project in the same solution and I go right-click on the calling project in solution explorer -> Add Reference -> Projects tab -> Project1 (the original class library).
Then right away, the reference shows up in Solution Explorer and it has a yellow exclamation mark overlaid on top of the reference icon, and
MyInterface
shows up in the IntelliSense as being able to be called, but
MyClass
will not show up in the IntelliSense, nor does the compiler see it. I have added a
using
statement for the
MyNamespace
namespace.
Plus, there is another class,
MyClass2
, in the same initial class library project, in its own file and in the correct nameapace. And again, the calling library cannot see it. This is just random. I cannot see any difference between
MyClass2
and
MyClass3
which is another class in the first class library that is also in the correct namespace and everything is defined as
public
and this is just so bizarre, as to why these two classes are just now showing up.
So I guess the question is twofold:
(1) if my first class library builds OK, why is its reference yellow exclamation mark? VS gives me no hints at all, no tooltips, no build errors, nothing as to why this is so.
(2) Why are some classes from the referenced class library visible and not others?
I have done the usual "Clean" and "Rebuild Solution" yada yada yada...
Any hints would be very much appreciated. Thanks.