The .Net 3.5 branch is not installed by default on Windows 2012 R2 server. Also this feature is not cached in the sources cache of the installation, so you need the source media.
First grab the the Windows 2012 R2 source media (and not the 2012R1). If not there, you can download the trial ISO from Microsoft web site.
You need two successive command lines to install .Net 3.5 branch, these are (need to be run from system32 in admin command prompt) :
dism.exe /online /enable-feature /featurename:NetFX3ServerFeatures /Source:d:\sources\sxs /LimitAccess
dism.exe /online /enable-feature /featurename:NetFX3 /Source:d:\sources\sxs /LimitAccess
The software Asoft .Net Version Detector provides an easy to validate that the installation is successful and operational :
http://www.asoft.be/prod_netver.html
aSoft .Net Detector