Multiple DLL exists after installation

P

Prateek

Hi,

I have one question related to installation of the assembly.

I have created 2 dlls, say a.dll and b.dll
I have created one exe which refers to both the dlls i.e. a.dll & b.dll

I have created another exe which referes to just one dlls i.e. a.dll
created 2 different setup for both the exe so that it get installed in
different directory say c:\app1 and c:\app2


Now problem I am having is that there multiple dll exists in each
installed directory. i.e. a.dll exists in C:\app1 and c:\app2
direcotry. What I really want is that, these dlls (a.dll & b.dll) are
my servers which needs to be installed in one direcotry and these exe
should use the dlls installed in the central location.


Can anybody help what I should be doing and what am i doing wrong.


Regards,


pb.
 
P

Phil Wilson

What you've done is pretty straightforward - you've created two completely
separate apps and installed them in their own app folders with their
dependent Dlls. I'm not sure if you expected something different to happen,
and why.

There's nothing wrong with two products having the same Dll installed with
each of them. Side by side installation is fine, and I don't know why you
might think it's an issue. Is it a COM Dll? Is there any reason why two
copies in separate locations is a bad thing? If the Dll is an assembly you
could install it in the GAC, but again why? Installing the same assembly
into the GAC from two separate setups can easily break if you don't set up
the sharing correctly - an uninstall of one product will remove it.

Basically my question for you is: Why is what you're doing a bad thing?
People do it all the time.
 
P

Prateek

Hi,

Well I want to have just one copy of dll in order to do a logging.

Here what I am doing. In my example a.ll is notging but a component
which does the loggin into a file. Now this component requires a config
file which specifies the location of log file.

Now in code I am accessing the config file with a relative path and the
log file location specified in the the config file is also a relative
path. so that each application will write a log in the location which
remains same all the time.

Why I am doing this, simpley to avoid changing this file for each site
location as I am not sure the drive in which this is going to get it
install.

What I really want is that when I install at every site, all my dll
should go in <drive><some folder>/bin and all exe should go in
<drive><some folder>/exe. When exe runs it should load the dll from the
dll directory so I don't have to keep the dll in exe folder. isn' t it
right.

Pls suggest if I am doing wrong thing..



Phil said:
What you've done is pretty straightforward - you've created two completely
separate apps and installed them in their own app folders with their
dependent Dlls. I'm not sure if you expected something different to happen,
and why.

There's nothing wrong with two products having the same Dll installed with
each of them. Side by side installation is fine, and I don't know why you
might think it's an issue. Is it a COM Dll? Is there any reason why two
copies in separate locations is a bad thing? If the Dll is an assembly you
could install it in the GAC, but again why? Installing the same assembly
into the GAC from two separate setups can easily break if you don't set up
the sharing correctly - an uninstall of one product will remove it.

Basically my question for you is: Why is what you're doing a bad thing?
People do it all the time.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

Prateek said:
Hi,

I have one question related to installation of the assembly.

I have created 2 dlls, say a.dll and b.dll
I have created one exe which refers to both the dlls i.e. a.dll & b.dll

I have created another exe which referes to just one dlls i.e. a.dll
created 2 different setup for both the exe so that it get installed in
different directory say c:\app1 and c:\app2


Now problem I am having is that there multiple dll exists in each
installed directory. i.e. a.dll exists in C:\app1 and c:\app2
direcotry. What I really want is that, these dlls (a.dll & b.dll) are
my servers which needs to be installed in one direcotry and these exe
should use the dlls installed in the central location.


Can anybody help what I should be doing and what am i doing wrong.


Regards,


pb.
 

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