Hi all,
 
What should this code in Reference::GetReferenceFiles do?
 
// Get a list of the references in the output directory
foreach (string referenceFile in Directory.GetFiles(fi.DirectoryName, "*.dll")) {
    // Now for each reference, get the related files (.xml, .pdf, etc...)
    string relatedFiles = Path.GetFileName(Path.ChangeExtension(referenceFile, ".*"));
    foreach (string relatedFile in Directory.GetFiles(fi.DirectoryName, relatedFiles)) {
        // Ignore any other the garbage files created
        string fileExtension = Path.GetExtension(relatedFile).ToLower(CultureInfo.InvariantCulture);
        if (fileExtension != ".dll" && fileExtension != ".xml" && fileExtension != ".pdb") {
            continue;
        }
        referencedFiles.Add(new FileInfo(relatedFile).Name);
    }
}
 
I do not underestand it at all. I have project which references assembly not in solution but in precompiled dll. It is in folder together with other 50 dlls which have no link with this one. And this code copy all that dlls to mine output directory!
 
Regards,
Martin

Reply via email to