Conflict between two references when building a dll

nope no 65 Reputation points
2023-06-07T20:22:32.17+00:00

I built a new winform that uses a 3rd party set of controls. Unbeknownst to me, the act of adding controls to the form added references into the project that the form was part of. When building this new form into the library, it eventually failed, stating that it has a conflict with two different versions of the component.

I have tried the following to remedy the situation:

removing all versioning from the licenses.csx file

(no result)

removing each of the older references of the libraries from the project and csproj

(When removing the older one, the project insisted that in order to build the dll, it needed the older version. When the older version was added back, it insisted there was a conflict. Removing the newer reference led to the same result)

removing the form entirely

(damage seems to be done, removing the new form didn't stop the conflict)

My question is this:

How do i get the older winforms to refer to the newer library that the 3rd party company created? Where does each control point to a specific dll it wants to use in order to compile? I tried searching through the csproj and found nothing.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,395 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,623 questions
{count} votes

Accepted answer
  1. Jiale Xue - MSFT 33,686 Reputation points Microsoft Vendor
    2023-06-08T07:21:41.3433333+00:00

    Hi @nope no , Welcome to Microsoft Q&A.

    It is more difficult to use different versions of the same name dll in the same project.

    You need to put them separately in subfolders of the output folder and then use redirection.

    Here's a complete example:Using multiple versions of the same DLL.

    Best Regards,

    Jiale


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    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

0 additional answers

Sort by: Most helpful