Here is my dilemma:
The Problem
- I have SubProgram (a DLL) that uses System.Data.SQLite and both are compiled to .NET 2.0
- My MainProgram (an EXE) is compiled to .NET 4.0
- My MainProgram loads SubProgram into a separate app domain and communicates with a proxy
Apparently, MainProgram is loading SubProgram and running it with .NET 4.0. This causes a known issue with System.Data.SQLite.
Now, I have researched and tried all the suggested fixes for the SQLite issue and the only one that worked was updating to the System.Data.SQLite assembly compiled using .NET 4.0 (see .NET 4.0 version at this link).
This would solve my issue only we have a strict set of rules for releasing and are not releasing SubProgram or it's dependencies in any way, therefore the System.Data.SQLite DLL that SubProgram is using must stay as the current .NET 2.0 version.
Question(s)
Is there a way to specify that MainProgram load and run SubProgram using .NET 2.0? Maybe something when setting up the app domain? So far I cannot find anything.
Is there another solution?