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

G

Guest

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?
 
T

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:
 
J

jeff

and the future is now.


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:
 
P

Phill W.

Krich said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top