Check if DOTNET_ROOT isn't already set, if not base the value on the location of the actual dotnet file, symlinked or not.