VS 2017 Setup not pulling dlls from correct folder. How can we fix this?

QuickBooksDev 1 Reputation point
2021-04-03T13:26:11.723+00:00

We have several VS 2017 VB window forms desktop programs that access the QuickBooks Online API .Net SDK dlls and some of our own dlls. All have worked for years including the one in question.

In one of them we made a programming changed and updated the NuGet components and built a new .msi from the setup project.

The installed program would not run do to the wrong dlls being used. The setup dependencies is picking up the dlls from the wrong folder. Most of these dlls are brought in from nuGet. A couple of our own dlls were not but still coming from the wrong folder.

Why are the dlls in the dependencies pointing to the wrong folder? They are not the same folders as in the app's references. How

I have redone the entire project a couple of times including starting a brand new setup project but no luck.

I do use add project output when creating the setup project.

Our other apps which use the same exact dlls do not have this problem even after many updates and new msi builds.

I think that part of the issue is that are other dlls from our other projects are sometimes included in the solution for debugging. The dlls are being duplicated in the references. But are other apps also include the same other projects without an issue.

Please help.

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,811 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Daniel Zhang-MSFT 9,611 Reputation points
    2021-04-05T02:28:09.693+00:00

    Hi QuickBooksDev-0076,
    First, please check whether the framework version of the project is the same as the framework version of the dll you are referencing.
    When adding project output, have you tried the "Locally-Copied Items" option?
    And you could add it as an item to your project and set the Build Action to Content and the Copy to Output Directory to Always.
    More suggestions you can refer to the following threads:
    Visual Studio Installer Project does not include all dlls from output folder
    Dependent DLL is not getting copied to the build output folder in Visual Studio
    Best Regards,
    Daniel Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments