1

I have several solutions in .NET many of them have projects with same DLL but different versions of these same dlls, inside the same solution.

So when deploying the build of the solution to the production server, only one of the dll versions were deployed resulting in assembly reference error. Except when the missing dll was in the server's GAC.

The current solution is to install manually the missing dlls in the server's GAC, or to deploy all the packages folder in version control, which I consider both bad solutions.

What is the standard procedure/best solution for this problem?

I was reading some material about the subject and all of them involve or creating another piece of code in the solution or to manually place the dlls in the server.

WilsonPena
  • 1,451
  • 2
  • 18
  • 37
  • 3
    The default solution should be not to have different versions of the same dll deployed in one application. – germi Jan 30 '20 at 13:49
  • The problem for me is that this project has several people working on. Many of them don't know they shouldn't do this. How can I avoid this error from happening without counting on the knowledge of the developers. – WilsonPena Jan 30 '20 at 13:52
  • cant you keep each project's dll into their own folder instead dropping them to gac? is this a desktop app? – Bagus Tesa Jan 30 '20 at 14:29
  • Does this answer your question? [Need a way to reference 2 different versions of the same 3rd party DLL](https://stackoverflow.com/questions/11550981/need-a-way-to-reference-2-different-versions-of-the-same-3rd-party-dll) – Orace Jan 30 '20 at 14:30
  • this answer would require changing A LOT of code. So it isn't really possible to use right now. – WilsonPena Jan 30 '20 at 15:46

0 Answers0