Home All Groups Group Topic Archive Search About

Problem with two version of program in one code and class referenc

Author
20 Jul 2006 10:48 AM
Krich
I am working on one project but it has 2 version(A and B). In version B, its
function is the same as in version A, except there is some extend function
that will reference one class ( .dll file), for example C.dll.

What I want is when compile version A, the exe file will not has C.dll as
its reference? Can VB.NET do that?

Author
20 Jul 2006 11:29 AM
tommaso.gastaldi
hi Krich, what do you mean " is the same as in version A". If they are
the same
would require same references. It's not clear, can you produce a
simplified code?

Also consider revising your code organization, I have some impression
you are calling
for future troubles...

-tom

Krich ha scritto:

Show quoteHide quote
> I am working on one project but it has 2 version(A and B). In version B, its
> function is the same as in version A, except there is some extend function
> that will reference one class ( .dll file), for example C.dll.
>
> What I want is when compile version A, the exe file will not has C.dll as
> its reference? Can VB.NET do that?
Author
20 Jul 2006 12:21 PM
jeff
and the future is now.


<tommaso.gasta***@uniroma1.it> wrote in message
Show quoteHide quote
news:1153394958.343064.318720@i42g2000cwa.googlegroups.com...
> hi Krich, what do you mean " is the same as in version A". If they are
> the same
> would require same references. It's not clear, can you produce a
> simplified code?
>
> Also consider revising your code organization, I have some impression
> you are calling
> for future troubles...
>
> -tom
>
> Krich ha scritto:
>
>> I am working on one project but it has 2 version(A and B). In version B,
>> its
>> function is the same as in version A, except there is some extend
>> function
>> that will reference one class ( .dll file), for example C.dll.
>>
>> What I want is when compile version A, the exe file will not has C.dll as
>> its reference? Can VB.NET do that?
>
Author
20 Jul 2006 1:31 PM
Phill W.
Krich wrote:
> I am working on one project but it has 2 version(A and B). In version B, its
> function is the same as in version A, except there is some extend function
> that will reference one class ( .dll file), for example C.dll.
>
> What I want is when compile version A, the exe file will not has C.dll as
> its reference? Can VB.NET do that?

No.
The references are held in the Project File and this can't contain
Conditional Compilation directives like the Source code can so
"conditionally" removing a reference can't be done.

Does this actually matter?
I don't think so.

Since .Net programs are "compiled" on a /per-method/ basis at run-time,
having the reference there /shouldn't/ matter.  It's only if your code
actually uses anything in the referenced assembly that things will go
wrong.  With Conditional Compilation directives around the code you want
to exclude, the extra reference will simply be ignored.

If you /really/ feel the need to remove the reference in the cut-down
version, you'll need to set up parallel Solution and Project files (both
using the same source code) and comple each version separately.

HTH,
    Phill  W.