How can I do it? 3.5 (so the user does not need to install 100 MB of files)?
You mentioned that there are "4 different versions" of .NET. Actually there are only 3: DotNetFX20, DotNetFX30 and DotNetFX35 and some updates for Windows. The reason is that .NET 3.5 and .NET 3.0 are actually mostly incremental versions on top of the .NET 2.0 libraries and runtime.
In other words, .NET 3.0 and .NET 2.0 are prerequisites for .NET 3.5. You need all of these files if your application is for .NET 3.5.
However, for some applications, only a subset of .NET 3.5, called the .NET 3.5 client profile, is required. You can try this by checking the "Client Infrastructure" checkbox in the project build settings of your visual studio.
If your application is still building and working fine with the client profile, you can change "Microsoft.Net.Framework.3.5" to "Microsoft.Net.Client.3.5". This is only 28 MB.
How do I tell WiX to pack these files into an MSI file, so the user only needs to download 1 file?
Prerequisites must be set before launching the MSI, so they cannot be part of the MSI. However, you can do the opposite: pack both the prerequisites and MSI into a self-extracting archive, for example. with WinZip Self-Extractor . A self-extracting archive may cause the extracted setup.exe file.
source share