You haven't posted your entire error, but the error I get when using your example is:
Unresolved reference to symbol 'Media:1' in section 'Fragment:'
The unresolved reference is a missing media element; the File needs to be stored in a cabinet and it defaults to File/@DiskId="1"
which is why it's looking for "Media:1". You need to tell WiX where to store the installation files. If you're using WiX 3.7, add this into your <Package>
element:
<MediaTemplate EmbedCab="yes" />
If you're using an earlier version:
<Media Id="1" Cabinet="Cab1.cab" EmbedCab="yes" />