That's correct behavior that also happens when compiling from VS.NET; referenced DLLs 
get copied to the executable folder.  You can change this behavior from VS.NET if you 
go to the properties of the reference and set copy local to false.  Unless you are 
putting probing directives into your configuration file, your DLLs either need to be 
in the same folder as your executable or they have to be strongly named and placed in 
the GAC.

I assume this is all correctly in the solution task since we use it extensively in a 
large project with some GAC dlls, some project dlls and some copy local dlls 
referenced directly.

-------------------------------------
TFC
 
________________________________________
From: Martin Aliger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 02, 2003 6:49 AM
To: ! nant

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



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to