none
Setup project adds duplicate dlls

    Question

  • I have a setup project where several .NET Framework 4 assemblies are listed in the Application Folder. When I close the setup project and reopen it, several dlls appear twice. The duplicate dlls have the suffix .DLL whereas the original dlls have suffix .dll. I have to remove them manually. This is very annoying and time consuming. Why does this happen? Is there a way to avoid this? I used Visual Studio 2010.

    The following screen dump shows the curly underlined duplicate dlls that have been added by Visual Studio.

    Curly underlined duplicate dlls added by Visual Studio

    Tuesday, December 31, 2013 7:32 AM

All replies

  • Hi pappasa,

    Setup project do not run duplicate reference check until build time. When you exclude a file from a Setup project, you may see that the file is included again after you close and re-open the solution. This may occur if there are two copies of the same DLL file from two different source locations.To work around thiserror, change the Copy Local property on one of the files:

    In Solution Explorer, click on the DLL reference that you want to remove.

    On the View menu, click Properties Window.

    Change the Copy Local property to False.


    Regards,


    Barry Wang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, January 01, 2014 2:07 AM
    Moderator
  • In the setup project there are no DLL references. There is the Application Folder which lists the files that are to be deployed. The Properties Window does not have a Copy Local property as is shown in the following picture.

    Setup project showing properties window


    • Edited by pappasa Thursday, January 02, 2014 7:47 AM
    Thursday, January 02, 2014 7:44 AM
  • Hello pappasa,

    Please refer to this article about this issue:

    http://msdn.microsoft.com/en-us/library/vstudio/t1zz5y8c(v=vs.100).aspx

    Here are steps:

    To set the Copy Local property to True or False

    1. In Solution Explorer, click the Show All Files button to display the References node.

    2. Open the References node for the project.

    3. Right-click a reference in the References list, and click Properties.

      The properties associated with that reference appear in a list in the Properties window.

    4. Select Copy Local from the left-hand column, and then click the arrow in the right-hand column to change the value to True or False.

    Regards,



    Barry Wang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, January 06, 2014 10:02 AM
    Moderator
  • This is a Setup Project (extension .vdproj) not a VB project (extension .vbproj). There is no References node in a Setup Project. A Setup Project is created in Visual Studio 2010 through File/New Project/Other Project Types/Setup and Deployment/Visual Studio Installer/Setup Project.

    Tuesday, January 07, 2014 7:26 AM
  • I know it is a setup project. However as you are reporting dlls duplicate. In my mind the issue is causing by "When another project is added as a project output group in the setup project, its dependencies are automatically added as well". Please clarify if you have embed any other project to this setup output group. 

    If you don't mind, please create a new simple setup project and add assembly use the following steps:

    • Right-click “File System on Target Machine”, click “Add Special Folder”, and then click “Global Assembly Cache Folder”.
    • By default, the assembly is inserted in the Application Folder (by default, it is a side-by-side installation). Drag the assembly to the Global Assembly Cache Folder.
    • Build the Setup Project.

    I don't think this simple step will cause duplicate Dependencies. So there must be a reason that dll is added more than one time. That is why I recommend you modify your dll property in your project which you may have tried to add as your output.

    However, if above steps reproduce your problem, then it could be a VS related problem and we may need some other solutions.

    Regards,

     


    Barry Wang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, January 07, 2014 11:39 AM
    Moderator
  • hi,

    i have the same problem.

    In the refferences, each project has its own...

    In the dependencies everything appears once...

    However in the FileSystem(the picture above is indicative)

    there are dublicates even for a project's output.

    When selecting files from the filesystem tab of the setup project

    no CopyLocal property is accesible... and as i said in every other

    place the .dlls appear just once, as they should

    any ideas?

    Wednesday, June 14, 2017 9:16 AM
  • I had the same issue and I was able to fix it.

    Add all your project files as necessary.  When you are done, right click on the "Detected Dependencies" folder and select the option "refresh dependencies".  The Setup project will then resolve and remove any redundant references so that there is only one file reference displayed.

    Hope that helped.

    Tuesday, June 20, 2017 9:56 PM