Weird setup project detected dependencies?

Posted on 2011-10-19
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
    LVL 40

    Expert Comment

    by:Jacques Bourgeois (James Burger)
    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

    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

    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

    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

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now