View Single Post
Old 09-04-2008   #5 (permalink)
Jeff Gaines


 
 

Re: Adding Files/Links To Projects

On 04/09/2008 in message <OY2c01oDJHA.2612@xxxxxx> Pavel
Minaev wrote:
Quote:

>.NET doesn't define dependencies in terms of classes, but rather in terms
>of assemblies. For assemblies, you can do pretty much what you described,
>so long as your dependencies are not exposed in public members of your
>class. In other words, if you have class A in project/assembly PA depend
>on class B in assembly PB, which in turn depends on class C in assembly
>PC, then you only need a reference to PB in PA, not to PC. You'll need a
>reference to PC only if class B extends class C, or if you use a public
>member of B that references C in its signature.
Thank you - I have just set up a new project with several projects within
it and that works nicely :-)
Quote:
Quote:

>>I could add a reference to the class file dll but would then probably need
>> one instance of VS running for each class project to alter/update on the hoof so to speak. Probably adding the original projects is easier.
>
>Once again, you do not need an instance of VS per project. You can have a
>single solution with as many projects as you wish, and you only need one
>instance of VS to work with that solution, and it will be entirely
>displayed in Solution Explorer with all the child projects.
Yes, I will need to get used to it but it achieves what I want, thank you
again :-)

A supplementary question...

I am running XP Pro x64 but usually compile for x86 as many of the
database drivers are x86 only.

What about a strategy similar to the above that would enable me to switch
between x86 and x64? Each included project can be switched between x86 and
x64 but the 'main' project needs a reference to the class file (dll) that
the included project produces, which are different for x86/x64. Is it
possible to have a means whereby a project can easily be switched back and
forth or is it better to just have an x86 project and an x64 project?

I like compiling and testing for x64 because it is totally unforgiving,
careless use of an 'int' instead of 'uint' and there are pieces of
computer everywhere - so it is a good discipline for me!

--
Jeff Gaines Damerham Hampshire UK
640k ought to be enough for anyone.
(Bill Gates, 1981)
My System SpecsSystem Spec