private static void AfterProcess(object sender, CompileFileEventArgs e) { if (!e.Config.IncludeInProject || !e.ContainsChanges) return; var item = _dte.Solution.FindProjectItem(e.Config.FileName); if (item == null || item.ContainingProject == null) return; string input = e.Config.GetAbsoluteInputFile(); string output = e.Config.GetAbsoluteOutputFile(); string inputWithOutputExtension = Path.ChangeExtension(input, Path.GetExtension(output)); if (Path.GetFileName(output).EndsWith(".es5.js")) inputWithOutputExtension = Path.ChangeExtension(inputWithOutputExtension, ".es5.js"); if (inputWithOutputExtension.Equals(output, StringComparison.OrdinalIgnoreCase)) { var inputItem = _dte.Solution.FindProjectItem(input); var outputItem = _dte.Solution.FindProjectItem(output); // Only add output file to project if it isn't already if (inputItem != null && outputItem == null) ProjectHelpers.AddNestedFile(input, output); } else { item.ContainingProject.AddFileToProject(e.Config.GetAbsoluteOutputFile()); } }
private static void AfterProcess(object sender, CompileFileEventArgs e) { if (!e.Config.IncludeInProject) return; var item = _dte.Solution.FindProjectItem(e.Config.FileName); if (item == null || item.ContainingProject == null) return; string input = e.Config.GetAbsoluteInputFile(); string output = e.Config.GetAbsoluteOutputFile(); string inputWithOutputExtension = Path.ChangeExtension(input, Path.GetExtension(output)); if (inputWithOutputExtension.Equals(output, StringComparison.OrdinalIgnoreCase)) { var inputItem = _dte.Solution.FindProjectItem(input); if (inputItem != null) ProjectHelpers.AddNestedFile(input, output); } else { item.ContainingProject.AddFileToProject(e.Config.GetAbsoluteOutputFile()); } }
private void Processor_AfterProcess(object sender, CompileFileEventArgs e) { Log.LogMessage(MessageImportance.High, "\tCompiled " + e.Config.OutputFile); }