My app uses .net 3.5, and compiles successfully under 4.5 without any modifications, so apparently the libraries my app uses exists both in 3.5 & 4.5. But windows 8 explicitly requires 3.5 even though 4.5 is available.
How can I (programatically) make my app use 3.5 when running on windows7 and 4.5 when running on windows8?
PS: Ideally I want to avoid using an app.config file
The only thing I could think to do, is to compile for both frameworks. And include both in your installer package, using it to install the correct one based on what you find on the system.