private static void AddTextFileToProject(Project project, IFileSystem fileSystem, string projectRelativePath, string text)
{
// Need to be sure the folder exists first
var outputDirPath = Path.GetDirectoryName(projectRelativePath);
var projectDir = project.GetOrCreateProjectItems(outputDirPath, true /* create */, fileSystem);
var diskPath = Path.Combine(project.GetFullPath(), projectRelativePath);
fileSystem.WriteAllText(diskPath, text);
projectDir.AddFromFile(diskPath);
}