Compile to two .NET Frameworks at once
Your best bet would be to create two separate csproj files, one that targets 3.5 and one that targets 4.0, and include them in the same solution. You can add all the files from one project to the other project. If you link the file, instead of regular add, then any updates you make in the file will be applied to both projects.
You will most likely run into issues if you try to have the projects in the same location, due to how Visual Studio maintains temporary build files. So you'd need to keep them in separate folders.
Finally, if you build an executable that targets 3.5, then it can be run as-is on .NET 4. So in general you should not need to build two versions of the EXE.
You could also use nAnt for automate builds and then you can configure several targets, each one for each framework