public override void Generate(ProjectType projectType, MSBuild.Project project) { var filename = Path.Combine(project.DirectoryPath, Name); File.WriteAllText(filename, Content); if (!IsExcluded) { project.AddItem("Content", Name); } }
public override void Generate(ProjectType projectType, MSBuild.Project project) { if (!IsMissing) { Directory.CreateDirectory(Path.Combine(project.DirectoryPath, Name)); } if (!IsExcluded) { project.AddItem("Folder", Name); } }
public override void Generate(ProjectType projectType, MSBuild.Project project) { if (!IsMissing) { var absName = Path.IsPathRooted(Name) ? Name : Path.Combine(project.DirectoryPath, Name); var absReferencePath = Path.IsPathRooted(ReferencePath) ? ReferencePath : Path.Combine(project.DirectoryPath, ReferencePath); NativeMethods.CreateSymbolicLink(absName, absReferencePath); } if (!IsExcluded) { project.AddItem("Folder", Name); } }
public override void Generate(ProjectType projectType, MSBuild.Project project) { var filename = Path.Combine(project.DirectoryPath, Name + projectType.CodeExtension); if (!IsMissing) { File.WriteAllText(filename, Content ?? projectType.SampleCode); } if (!IsExcluded) { List<KeyValuePair<string, string>> metadata = new List<KeyValuePair<string, string>>(); if (LinkFile != null) { metadata.Add(new KeyValuePair<string, string>("Link", LinkFile + projectType.CodeExtension)); } project.AddItem( "Compile", Name + projectType.CodeExtension, metadata ); } }