Got this error? Well, there's an easy fix for that. For some reason some server roles require you to specify an alternate source path, and even when specifying the install.wim file from the installation media, it didn't work for me...
So, what now? Luckily we can still use the dism utility to install the .NET framework. This command should get the job done:
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:D:\Sources\sxs
D:\Sources\sxs is the location to the
sxs folder on the Server 2012 R2 installation disk.