Jenkins slave not able to find dotnet
When I did echo %USERPROFILE% from Jenkins it returned null. So I had to 
manually set USERPROFILE value from Jenkins as environment variable. Also I had to set these

APPDATA=%USERPROFILE%\AppData\Roaming

LOCALAPPDATA=%USERPROFILE%\AppData\Local