I have inherited a vb.net app that is a few years old now and have to update it to send orders to 2 versions of a 3rd party system.
- Project A (existing) uses 3rd party dll in .net framework 3.5.
Project B (new clone of A) uses a newer version of 3rd party dll in .net 4.7.
Project Main (new) references Projects A & B plus 3 other projects in the solution; Entities, DataAccess & Core. Project Main has a SendTo function that either sends to the Project A or Project B SendTo function.
Project Core (new) References Entities & Data Access projects as well as the new 3rd party dll.
It has an interface:
Imports Entities
Public Interface IOrderService
Function SendTo(...) as Order
End Interface
which references the Entities project (.net 4.7)
And another interface:
Public Interface IClientSessionProvider
Function LogonService() as LogonService
...
End Interface
etc. which references the new 3rd party dll.
If I try and use the new .dll in Project A & make that .net framework 4.7 I get an 'Error in Application' error when using one of the .dll functions. This function works perfectly in Project B (which uses the new .dll).
How can I best organise the code so that Project A remains 3.5, everything else remains 4.7 & my solution can talk to both .dll's as required?
Is it possible to keep my interface so the code can still call the method in Project A or B as necessary, or is there another way to solve this?