• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2391
  • Last Modified:

Weird setup project detected dependencies?

hi guys,

im building a "Setup Project" for my application and every time i do i get a bunch of .dll's that have absolutely nothing to do with my project. For example inside my insaller "Detected Dependencies" folder i have the following:
  - .Net Framework
  - CrystalDecisions.ReportAppService
  - Flash10l.ocx
  - FlashControlV71.dll
  - log4net.dll
  - Microsoft.VIsualBasic.PowerPack.VS.dll
  - ShockwareFlashObjects.dll
  - stdole.dll

now i know im using power packs and crystal reports, however i have no idea where the others have crept in from. from googling around it looks like most of these dll's are in relation to flash, however my project has nothing to do with flash and when i go Project -> Properties -> References: there are no references that suggest anything even remotely close to flash.

anyone have any ideas on whats going on here? why are these dependencies popping up and how can i remove them?

  • 2
  • 2
1 Solution
Jacques Bourgeois (James Burger)PresidentCommented:
Sometimes, a dll is needed even if you did not implicitely referenced it. For instance, stdole.dll is needed anytime you need to communicate with a COM dll. You might not see it in your references, but if one of the dll that you referenced needs it, it will be added automatically to the installation.

There is also the possibility of manually adding files in the Setup Project. Maybe the extra dlls were added somewhere in there. You would then need to also remove them manually.  

A usually good way to get rid of the extras is the following.

First delete everything that has accumulated in the compilation directory (usually somewhere under bin), leaving only the files that you might have implicitely created and that were not the result of the compilation.

Then, go to the Reference tab of the project's Properties window. There is a nice button that can remove "Unused References" toward the top of the tab. It will actually remove any reference to dlls that are not implicitely used by your code. So if you tried something at some point, and later on decided not to used it but forgot to remove the reference, the button will do it for you. When you recompile both the application or the Setup project, you should normally get only what your application really needs.

If you still have your seemingly unused dlls, then it is probably because they are part of the dependency of something you do use.
gem56Author Commented:
hello James, thank you for your response.

i've kept digging and found that crystal reports requires "FlashControlV71.dll", which that file then requires a couple of the others, and those others require the rest. unfortunately now this leaves me with a good dozen or so .dll's in my application folder which clutters it up really bad. as i need to distribute crystal report runtimes with my installer anyway, is it possible to just throw all those extra dll's into the GAC? this is my first experience with building a setup and deployment, so im not really too sure on whats the procedure :S

Jacques Bourgeois (James Burger)PresidentCommented:
2 things here.

First, to install in the GAC, the user must be administrator. So that depends on the way things are installed in your shop. Many programmers do install Crystal in the GAC, because once people start using Crystal in a company, they usually use it in many different applications. That is the role of the GAC.

Second, Crystal is a pain to install. I am lucky because I stopped using it when .NET came out in 2002, But I remember my VB6 years when there was always something missing when trying to install Crystal with my applications. I meet a lot of programmers in my job as a ,NET trainer, and have been told by many that the problem still exists. Something to do with the dependencies that are not declared correctly, and dlls are missing.

What I have been told is that it works bette when using ClickOnce deployment. ClickOnce offers the option to install some of the stuff you need in your application, such as the framework, SQL Server Express and yes, Crystal, from the vendors site. It's completely transparent to the user. He installs your application, and in the background the installer connects to the vendors site and installs the necessary components from there. I have been told by 2 different persons that they solved their Crystal installation problems that way.

That being said, ClickOnce is a wonderful way to distribute your application if the model suits you. But you have no control on where the stuff is installed. I never did it, so I do not know how it deals with Crystal and where it is installed.

Hope this helps you a bit.
gem56Author Commented:
hello again James,

yeah working with CR is a complete nightmare, its literally the first thing on my list of things to remove when we get some breathing time.

thanks very much for your help though, very informative ;)

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now