Our application is built with VS 2008, uses Linq and has Target Framework set to .NET Framework3.5.
It works OK when only .NET 3.5 or 4 is installed on the machine.
However, on machines where both .NET 2 (or 3.0) and .NET 4 are installed, the application is loaded with .NET 2, and crashes when Linq is accessed, as it looks for the .NET 3.5 libraries.
Using the tag in app.config doesn't seem to help, as it specifies the CLR version, which is 2 in case of .NET 3.5.
Note that our installation verifies that .NET 3.5 or upper is installed.
Is there a way to tell the application to load:
- the highest CLR it finds, or
- CLR 4 if it is installed, and CLR 2 is CLR 4 is not installed, or
- CLR 2 if .NET 3.5 is installed and CLR 4 if .NET 3.5 is not installed
(Note that similar question is left unanswered in the Community Content section of the Element documentation)