/// <summary> /// Adds the given file and any additional build products to the output set /// </summary> /// <param name="OutputFile">The assembly to add</param> /// <param name="OutputFiles">Set to receive the file and support files</param> public static void AddReferencedAssemblyAndSupportFiles(FileReference OutputFile, HashSet<FileReference> OutputFiles) { OutputFiles.Add(OutputFile); FileReference SymbolFile = OutputFile.ChangeExtension(".pdb"); if (FileReference.Exists(SymbolFile)) { OutputFiles.Add(SymbolFile); } FileReference DocumentationFile = OutputFile.ChangeExtension(".xml"); if (FileReference.Exists(DocumentationFile)) { OutputFiles.Add(DocumentationFile); } }
/// <summary> /// Adds aall input/output properties of a CSProject to a hash collection /// </summary> /// <param name="Hasher"></param> /// <param name="Project"></param> /// <returns></returns> public static bool AddCsProjectInfo(this HashCollection Hasher, CsProjectInfo Project, HashCollection.HashType HashType) { // Get the output assembly and pdb file DirectoryReference ProjectDirectory = Project.ProjectPath.Directory; DirectoryReference OutputDir = Project.GetOutputDir(ProjectDirectory); FileReference OutputFile = FileReference.Combine(OutputDir, Project.GetAssemblyName() + ".dll"); FileReference DebugFile = OutputFile.ChangeExtension("pdb"); // build a list of all input and output files from this module List <FileReference> DependentFiles = new List <FileReference> { Project.ProjectPath, OutputFile, DebugFile }; DependentFiles.AddRange(Project.CompileReferences); if (!Hasher.AddFiles(DependentFiles, HashType)) { return(false); } return(true); }