R
Rob Richardson
Greetings!
I am trying to split pieces of code out from my company's application into
components that can easily be reused. I've run across a couple of places
where I think I have to do more than I should.
Case 1: I have three classes: Top, Middle (derived from Top) and Bottom
(derived from Middle). The definitions for all three are in separate DLLs.
When I built the Bottom project, I added a reference to the Middle project.
I got an error saying that since Middle references Top, Bottom also had to
reference Top. I don't understand this. Why should Bottom know anything
about Top? It will never use anything in Top directly. This seems also to
mean that if a user ever uses the Bottom class,. his project would have to
reference all three DLLs! Isn't there a way I can make it sufficient for
Bottom to reference Middle?
Case 2: My components should work on both Pocket PCs and desktops wherever
possible. I haven't yet found a way to have a single project with two
configurations, one for desktop builds and the other for Pocket PC builds.
But that's not the point of this question. I have two projects, one for
each target. There is no difference in the source code between the two
projects. But if I select Add Existing Item and add a class file used in
one project to the other project, the file gets copied into the second
project's folder. Isn't there a way for two projects to use the same file?
Thanks very much!
Rob Richardson
I am trying to split pieces of code out from my company's application into
components that can easily be reused. I've run across a couple of places
where I think I have to do more than I should.
Case 1: I have three classes: Top, Middle (derived from Top) and Bottom
(derived from Middle). The definitions for all three are in separate DLLs.
When I built the Bottom project, I added a reference to the Middle project.
I got an error saying that since Middle references Top, Bottom also had to
reference Top. I don't understand this. Why should Bottom know anything
about Top? It will never use anything in Top directly. This seems also to
mean that if a user ever uses the Bottom class,. his project would have to
reference all three DLLs! Isn't there a way I can make it sufficient for
Bottom to reference Middle?
Case 2: My components should work on both Pocket PCs and desktops wherever
possible. I haven't yet found a way to have a single project with two
configurations, one for desktop builds and the other for Pocket PC builds.
But that's not the point of this question. I have two projects, one for
each target. There is no difference in the source code between the two
projects. But if I select Add Existing Item and add a class file used in
one project to the other project, the file gets copied into the second
project's folder. Isn't there a way for two projects to use the same file?
Thanks very much!
Rob Richardson