If I want to read a local file from my project, given a relative path from the project directory, how could I achieve this?
Now that .NET Core has RTM-ed, you need to use IHostingEnvironment instead. It exposes WebRootPathand ContentRootPath.
IHostingEnvironment
WebRootPath
ContentRootPath