Closed kevinkuszyk closed 7 years ago
Unfortunately the project object isn't on the interface for IBeforeCompileContext but is does exist via some casting against the Concrete type
CompileContext context = ((CompileContext)context);
var rootFolder = Path.GetDirectoryName(context?.Project.ProjectFilePath)
An alternative might be get the FilePath from a syntax tree and work it out using that
That issue seems to be obsolete/unnecessary at this point, since writing generated.cs files is now working.
If getting the root path for the project is necessary in other scenarios, it can easily be picked up from the Workspace
's Project
properties
We need to find where on disk the
project.json
file is for the project hosting R4MVC, so we write out our generated.cs
files.At the moment it is hard coded here.