The solution task works a bit differently that Visual Studio. Here are some points.
If the Private attribute is missing VisualStudio assumes it is True which is the default. This is why your project file didn't have it defined. VisualStudio handles private assemblies in a unique way, it loads in the assemblies and finds all referenced assemblies. To test this you can create a project, reference a.dll. Make sure a.dll references b.dll. When you compile your project note that b.dll AND a.dll are both copied to the bin folder. The solution task is not as sophisiticated, it just copies all the files a.dll's folder assuming that they are there because they are referenced by a.dll. This is almost always a safe assumption. brant ... > Message: 1 > From: "Monsur Hossain" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>, > <[EMAIL PROTECTED]> > Date: Wed, 24 Sep 2003 15:34:35 -0400 > Organization: Xanga.com > Subject: [Nant-users] =?iso-8859-1?Q?RE:_=5BNant-users=5D_RE=A0:_=5BNant-users=5D_Question_abou?= > =?iso-8859-1?Q?t_=3Csolution=3E_reference_resolution_behaviour?= > > > Hi there. I'm looking at a web project in VS.NET that has a reference > with "Copy Local" equal "True". However when I open the corresponding > .csproj file in a text editor, there is no "Private" attribute marked > "True" in the reference's tag. Is there somewhere else that VS.NET > might store this information, or am I missing something? > > And just out of curiosity, I added the attribute 'Private =3D "True"' to > the reference's tag. This caused Nant to copy ALL the references > locally, as if that attribute were applied to all references. I'm using > the latest Nant build. Still looking into whats going on, but I thought > I'd throw this out there. > > Thanks, > Monsur > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Vincent > Labatut > Sent: Tuesday, September 16, 2003 12:05 PM > To: Mike Roberts; [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Subject: [Nant-users] RE : [Nant-users] Question about <solution> > reference resolution behaviour > > > I have exactly the same problem as you, and it seems not to have been > corrected since then. > =20 > 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. > =20 > =20 > =20 > There is actually a slight difference of behaviour between Visual Studio > and the solution task : > =20 > - 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 !) > =20 > - 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 !! > =20 > I fixed that on my machine and it worked fine for my whole solution (25 > projects). > =20 > =20 > 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 > =20 > =20 > It should work as I said if u change the following line > (NAnt/VS.Net/Reference.cs, line 101 of current version) : > =20 > _copyLocal =3D _privateSpecified ? _isPrivate : true; > =20 > by this one > =20 > _copyLocal =3D _privateSpecified ? _isPrivate : false; > =20 > (it is in the else part, when the assembly is not in the GAC) > =20 > =20 > regards, > vincent > =20 > =20 > =20 > =20 > -------- Message d'origine--------=20 > De: Mike Roberts [mailto:[EMAIL PROTECTED] > Date: jeu. 26/06/2003 23:11=20 > =C0: [EMAIL PROTECTED] > Cc:=20 > Objet: [Nant-users] Question about <solution> reference resolution > behaviour > > > > Hi, > =09 > I'm just starting to use the <solution> task and I'm a bit > confused by > its behaviour. If a project references a dll in a folder, > <solution> > seems to copy *all* the dlls from that folder to the > build/output > directory, not just the one that was referenced. In my > environment, this > leads to my output dirs having significantly more content in > them when I > use <solution> as opposed to when I use VS's compiler. Is there > a reason > for this behaviour? > =09 > Cheers, > =09 > Mike > =09 > > Nu=19Yz5?5~zqz > > > > > --__--__-- > > _______________________________________________ > Nant-users mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/nant-users > > > End of Nant-users Digest > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/2003 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users