I am compiling third party C++ code using /CLR flag which requires only .NET Framework 3.5.
The code is getting compiled fine, but since I have .NET 4.0 installed on my dev box the resulting binary doesn’t work for any .NET framework less than 4.0
So, how do I tell Visual Studio to use a particular version of the .NET Framework while compiling?
Quoting an article on the Visual C++ Team Blog, Visual Studio 2010 C++ Project Upgrade Guide: