Hey Yves,
I see. This is an interesting setup. If you plan on modify wyUpdate.exe to force it to load for .NET 4.0, then you'll have to maintain your own self-update files on your server (see: How to make a custom version of wyUpdate). If you don't do this, and your user is running on a purely .NET 4.0 system wyUpdate will crash and burn when it self-updates.
We'll look into possibly building wyUpdate with that modified setting. This way you won't have to maintain your own build of wyUpdate. We need to assure there are no adverse effects of using .NET 2.0 code in the .NET 4.0 runtime.
But that means that I have to distribute two different wyUpdate.exe and install the right one depending on the .NET version installed on the target machine.
That's true.
In my view this is unnecessary work since a .NET 2.0 exe runs fine in a .NET 4.0 environment with the mentioned configuration adjustment.
This is an untested code path. That is, we don't test running the .NET 2.0 wyUpdate under .NET 4.0. You can force it, but I'm not sure it's wise. We'll have to look into it.
The only issue I see with wyBuild.exe for 2.0 is with NGEN which has to be found in the .NET 4.0 folder instead of the .NET 2.0 folder. I don't know if this folder is being looked up depending on the running .NET version or if it's hardcoded.
As far as NGENing goes, wyBuild scans your assemblies to detect what .NET version they are built for and wyUpdate tries to NGEN these assemblies based on system locations of the .NET frameworks. If the .NET framework is not found, wyUpdate skips the NGENing step.