I realize this is old but this more recent question I answered is very similar. You have it even easier if you aren't using a bootstrapper.
From the msi .wxs file you can either use a PowerShell script or winget command (You can find both here) to perform a web install of whatever .NET runtime you need.