I have a dll that other applications use. It relies on a 3rd party dll that updates fairly regularly. As long as the version I need or greater is present then I am happy.
But Visual Studio forces the exact version I need on the apps that use my dll.
I want to add an event handler to AppDomain.CurrentDomain.AssemblyResolve so I can check for a later version and just use that. But I don't know where to add it.
Most apps would put this in program.cs startup. But a dll does not have that.
I would put it in a static constructor, but I have many classes that use this 3rd party dll. It seems messy to put this event attach into each class.
Is there any other option?