Weird setup project detected dependencies?

Posted on 2011-10-19
Medium Priority
Last Modified: 2012-05-12
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?

Question by:gem56
  • 2
  • 2
LVL 40
ID: 36997571
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.

Author Comment

ID: 36997589
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

LVL 40

Accepted Solution

Jacques Bourgeois (James Burger) earned 2000 total points
ID: 36997682
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.

Author Comment

ID: 36997712
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 ;)


Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question