We create a plugin for a software that was built for .NET 3.5. In this plugin, we reference a third party .DLL that works for .NET 3.5. The main software is now built to .NET 4.0 and the third party .DLL has been split up into two .DLL.
What we want to avoid is having two seperate solutions with almost the exact same code (one built to .NET 4.0 referencing the 4.0 DLLs and one built to 3.5 referencing the 3.5 DLLs). Not all of our customers are going to upgrade to the newest version of the software we create plugins for right away, some may wait years.
QUESTION EDITED:
Is there any way to continue to build to .Net 3.5 referencing the 3.5 DLL, and then at run time perform some assembly resolve to load the two .Net 4.0 DLLs in the place of the original one?
We want/need to keep building to a 3.5 framework so that previous versions of the main software will continue to load our plugin. If we build to 4.0 then the older versions will give an error when trying to load our plugin because its build to a later framework.