Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2006

Tip: Looking for answers? Try searching our database.

Multiple DLL exists after installation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Prateek - 11 Jul 2006 15:49 GMT
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.
Phil Wilson - 11 Jul 2006 17:41 GMT
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.
Signature

Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

> Hi,
>
[quoted text clipped - 18 lines]
>
> pb.
Prateek - 12 Jul 2006 17:31 GMT
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..

> What you've done is pretty straightforward - you've created two completely
> separate apps and installed them in their own app folders with their
[quoted text clipped - 39 lines]
> >
> > pb.
Phil Wilson - 13 Jul 2006 16:35 GMT
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

> Hi,
>
[quoted text clipped - 69 lines]
>> >
>> > pb.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.