(The context of this question is specific to XNA, but the principle is general.)
I have a Project A
with a Game
class that extends Microsoft.Xna.Framework.Game
. Project A
is a class library and outputs a DLL.
I then have a project B
that extends the A.Game
class and has a reference to A.dll
. When I try and compile B
, I get this error:
The type 'Microsoft.Xna.Framework.Game' is defined in an assembly that is not referenced. You must add a reference to assembly [...]
I don't understand why this is the case; B only depends on A, which internally depends on Xna. Is it because A.Game is a subclass? Is there a way to remove this dependency requirement?
What I'm aiming for is to make A
self-publishing; it outputs only one DLL, and any project references it; whatever it uses internally isn't required by end-users (developers).
I also checked out this question on transitive dependencies, but I don't expose any fields in A.Game
yet -- only subclass.