Hello, the mail i sent the 16th sept 2003 is still valid and concerns also nant 8.4 final, there's a big problem with File References in the solution task. This does not concern project References. I gave all the details below. The solution Task uses the wrong default value for the "Private" attribute on a file reference.
You should check this in, here's a diff file attached (sorry for the file names, i can't use CVS from where I am). The diff was done with the 8.4 final version. To test the result, simply add a file reference with VS.NET, and reference a dll located outside the solution (it should not match an existing project in the solution). Set the copy local attribute to "False" and save. Then loot at the project file (XML) and check that there is no "private" attribute on the reference node. We are testing the default value that will be given by the solution task. Now launch a NAnt build with the solution task. The referenced dll (and its friends ;) should not appear in the output directory. ----------------------------------------------------------------------- this was my mail, transpose GAC to "system assemblies" and it shoud be correct ;) ----------------------------------------------------------------------- I took care of setting the "Copy Local" property of my file reference to "False", but the solution task still copies 43 files in my output directory. There is actually a slight difference of behaviour between Visual Studio and the solution task : - in Visual Studio, if Local Copy is not defined it is assumed as "False" (beware that the value you see in the IDE is not always written in the project xml file because False is the default value !) - in NAnt, if the attribute Private (which corresponds to "Copy Local") is not defined in the project file, and the reference is neither a project reference nor an assembly in the GAC, the CopyLocal value is set to TRUE !! I fixed that on my machine and it worked fine for my whole solution (25 projects). To summarise, I propose the following behaviour for the CopyLocal value : - always take into account the value of the Private attribute if defined - if not defined : * if it is a project reference then CopyLocal is true * if anything else (file present in gac or not) then CopyLocal is false It should work as I said if u change the following line (NAnt/VS.Net/Reference.cs, line 101 of current version) : _copyLocal = _privateSpecified ? _isPrivate : true; by this one _copyLocal = _privateSpecified ? _isPrivate : false; (it is in the else part, when the assembly is not in the GAC) regards, vincent
Reference.diff
Description: Binary data