Home All Groups Group Topic Archive Search About

Multiple DLL exists after installation

Author
11 Jul 2006 2:49 PM
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.

Author
11 Jul 2006 4:41 PM
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.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

Show quote
"Prateek" <prateekb***@gmail.com> wrote in message
news:1152629383.757165.247980@p79g2000cwp.googlegroups.com...
> 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.
>
Author
12 Jul 2006 4:31 PM
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 Wilson wrote:

Show quote
> 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" <prateekb***@gmail.com> wrote in message
> news:1152629383.757165.247980@p79g2000cwp.googlegroups.com...
> > 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.
> >
Author
13 Jul 2006 3:35 PM
Phil Wilson
Your application won't work if the exe is in some folder and all the
dependent assemblies are in a completely separate folder that isn't a
subfolder.  Assuming you have an executable and some assemblies, you need to
understand that your app works only because they are all in the same folder.
Also, I can't figure out how you can make your design work. You have two
setups, both with a.dll, so both will install a config file for the logging
that you want to go into one location. Does one replace the other if app2 is
installed after app1 has changed the config file? What happens if one app is
uninstalled? (It will most likely uninstall the config file).

If you have two separate apps (you have two setups) surely they need their
own logging, not logging from one app mixed in with logging from the other?
My inclination would be for each app to have its own config file and the
logging Dll so that each logs to an app-specific location. If you uninstall
one app. the other keeps its logging Dll and its config file and still
works.

The other alternative that's quite common is simply not to give the user a
choice. There's often no reason to ask the user to tweak where a log file
goes when there are perfectly fine default locations, such as somewhere in
Documents&Settings (Environment.SpecialFolder.CommonApplicationData + your
product name, as an example). --
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

Show quote
"Prateek" <prateekb***@gmail.com> wrote in message
news:1152721867.204493.111140@h48g2000cwc.googlegroups.com...
> 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 Wilson wrote:
>
>> 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" <prateekb***@gmail.com> wrote in message
>> news:1152629383.757165.247980@p79g2000cwp.googlegroups.com...
>> > 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.
>> >
>

AddThis Social Bookmark Button