cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jwilliams12
Level 3

Install Shield not finding dependency in project output

I have a project in which I am using a log4net reference. The reference points to a solution folder which contains the log4net.dll.

When I compile the regular project the log4net.dll is copied to the project output directory and there are no problems.

When I setup up my Install Shield project I use that project's primary output. When I go into section 2 (files) and bring up the context menu for the primary out put I find the option to display "dependencies of scan at build" which yields the list of dependent dlls. Some of these I do not want included, so I remove the check mark and rebuild and it is fine.

The problem is even though log4net is is the regular project as a reference it never shows up in the setup project as a dependency and does not get added.

Can someone explain why this may be happening?
Labels (1)
0 Kudos
(3) Replies
DLee65
Level 13

I wonder if this is a difference between a static scan and a dynamic scan where the log4net reference is a delayed load dependency? IF so it will not appear in a static scan.

IN any case, you should not 'depend' on the dependency scanner to add all of your dependencies. While it is a good sanity check when first creating an installation, you may need to add other dependencies that the scanner cannot detect, for instance your log4net. If you realize it is a dependency, just add a new component called log4net.dll, associated with the correct feature set, and set whatever properties are required. If you have a customized xml file for the log4net, you can also associate it with the same .dll component.

Note that the customized .xml file for log4net is a prime example of why you need to know your install requirements. A static scan of the install may list log4net.dll but it will not list the .xml requirement. Log4net is often customized by a .xml file that indicates a directory for logging and other required settings.
0 Kudos
jwilliams12
Level 3

DLee65,

I as you said added it manually as a dependency. I however do not include the .xml for the config as our tech team will manually drop those in place as needed. Could you please take a few minutes and describe to me the difference between the static and dynamic scans you mentioned. Please keep in mind that I am using InstallShield LE at this point. Not sure if the setting can be changed on it. I am used to vdproj files and just using project references. I never really had a problem when using them. I have noticed with using InstallShield it tries to dig down much deeper to find dependencies, some of which I had to exclude from my primary output of my project reference, since I knew they were not needed for my particular installation. We reuse components from a sister application which will be preinstalled and it was finding everything which it relied on as well.
0 Kudos
DLee65
Level 13

Hi there jwilliams:

Unfortunately I am not familiar with the differences between InstallShield LE and InstallShield Premier, I am assuming that it has a very basic layout and feature set for the developer.

A static scan looks at dll, ocx, and exe files as they are added to the installation package. It does not pick up on any dependency that are loaded after the application is running. The dynamic scan will attempt to launch your app.exe file and then check for dependencies as the application loads and you interact with the UI of the application. The InstallShield documentation explains this far better than I do: http://helpnet.flexerasoftware.com/installshield21helplib/installshield21helplib.htm
My guess is that LE limits the type of scan to static only, that is why it is not obvious to you that there are two different levels of scanning.

The bottom line however, in all situations, and it sounds like you are doing this anyway, no matter if you do a static scan or dynamic scan, "trust but verify". It is a tool provided to help us, but in the end I am ultimately responsible for all of the files that get added or left out of our installation.
0 Kudos