I built a program in C# .NET 2.0 that works great also under framework 3.0 and 3.5.
But if .NET Framework 4.0 is the only framework installed, it does not working, i
It is very hard to find a machine that only has 4.0 installed. .NET 2.0 compatible versions are pre-installed on Vista and Win7 machines, they'll run your program without a hitch. You'd have to have a virgin XP machine that never had .NET installed. Maybe a server core. In which case somebody made a bit of a blunder by installing the wrong version of .NET.
Not sure how that happened, smells like a communication problem. Maybe you shouldn't leave it up to somebody else to get this wrong. When the system requirements for your app include support for XP then you'd better make sure it is available. Pretty simple with a Setup project.
Your app.config is otherwise wrong, has been obsolete since .NET 1.0. The proper incantation is and ask for both 2.0.50727 and 4.0