Re: [nant-dev] solution task & assemblyfolders
Hi, One fatal problem. We miss this in contructor: --- Tasks/SolutionTask.cs 2 Sep 2003 18:54:09 - 1.11 +++ Tasks/SolutionTask.cs 4 Sep 2003 13:39:55 - @@ -126,6 +126,7 @@ _referenceProjects = new FileSet(); _excludeProjects = new FileSet(); _webMaps = new WebMapCollection(); + _assemblyFolders = new FileSet(); } #endregion Public Instance Constructors Martin - Original Message - From: "Gert Driesen" <[EMAIL PROTECTED]> To: "Martin Aliger" <[EMAIL PROTECTED]>; "Jaroslaw Kowalski" <[EMAIL PROTECTED]>; "! nant" <[EMAIL PROTECTED]> Sent: Tuesday, September 02, 2003 9:17 PM Subject: Re: [nant-dev] solution task & assemblyfolders > Martin, > > Your patches were committed to cvs. > > Thanks for the contribution, > > Gert > > - Original Message - > From: "Martin Aliger" <[EMAIL PROTECTED]> > To: "Jaroslaw Kowalski" <[EMAIL PROTECTED]>; "! nant" > <[EMAIL PROTECTED]> > Sent: Tuesday, September 02, 2003 6:18 PM > Subject: Re: [nant-dev] solution task & assemblyfolders > > > > Hi again, > > > > I review mine patch I sent yesterday and fix problems Jarek found (thanks > > again) [solution.patch] > > There are still problem with registry read (which Matt point out) and I > set > > new includevsfolders attribute default to true (VS compatible, not > > compatible with current nant, use registry read). > > > > > > 2/ I find problem with project dependencies when you are not explicitly > use > > project dependency, but normal one and include dependent project into > > solution. > > E.g. > > > > project1 standalone > > project2 depends on project1.dll > > > > and build both projects. Dependencies are not correctly found now. Visual > > Studio fails as well, but we could be better here :) > > > > [b.patch] address this issue (it uses AssemblyFolders from previous patch, > > because this do not happen without it) > > > > Regards, > > Martin > > > > btw: if someone is better English speaker than I am, please correct mine > > comments in code > > > > > > - Original Message - > > From: "Jaroslaw Kowalski" <[EMAIL PROTECTED]> > > To: "Martin Aliger" <[EMAIL PROTECTED]>; "! nant" > > <[EMAIL PROTECTED]> > > Sent: Monday, September 01, 2003 5:48 PM > > Subject: Re: [nant-dev] solution task & assemblyfolders > > > > > > > Hi all! > > > > > > That's a very good idea, however just by looking at your patch I see few > > > problems: > > > > > > 1. When you have both VS.NET 2002 and VS.NET 2003 you actually have more > > > registry keys to consider: > > > > > > HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.0\AssemblyFolders > > > HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.0\AssemblyFolders > > > HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.1\AssemblyFolders > > > HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\AssemblyFolders > > > > > > where as a rule CURRENT_USER settings override the local machine. I > think > > > that the registry paths should be stored a part of the framework > > > configuration in NAnt.exe.config. For mono on linux you would simply > have > > no > > > paths to examine. > > > > > > 2. Looks like there's a mistake in your code: > > > > > > +FileSet af = _solutionTask.AssemblyFolders; > > > +if(af.DirectoryNames.Count==0) > > > af=_solutionTask.DefaultAssemlyFolders; > > > + > > > +foreach(string path in > > > _solutionTask.AssemblyFolders.DirectoryNames) > > > +{ > > > +fiRef = new FileInfo(Path.Combine(path,justFilename)); > > > +if ( fiRef.Exists ) > > > +{ > > > +_referenceFile = fiRef.FullName; > > > +_baseDirectory = fiRef.DirectoryName; > > > +return; > > > +} > > > +} > > > > > > You initialize local variable "af" to some fileset but iterate over > > > "_solutionTask.AssemblyFolders.DirectoryNames" so obviously "af" is not > > > used. I think it was meant to be "foreach(string path in > > af.DirectoryNames)" > > > > > > 3. I think there should be an option to inc
Re: [nant-dev] solution task & assemblyfolders
Martin, Your patches were committed to cvs. Thanks for the contribution, Gert - Original Message - From: "Martin Aliger" <[EMAIL PROTECTED]> To: "Jaroslaw Kowalski" <[EMAIL PROTECTED]>; "! nant" <[EMAIL PROTECTED]> Sent: Tuesday, September 02, 2003 6:18 PM Subject: Re: [nant-dev] solution task & assemblyfolders > Hi again, > > I review mine patch I sent yesterday and fix problems Jarek found (thanks > again) [solution.patch] > There are still problem with registry read (which Matt point out) and I set > new includevsfolders attribute default to true (VS compatible, not > compatible with current nant, use registry read). > > > 2/ I find problem with project dependencies when you are not explicitly use > project dependency, but normal one and include dependent project into > solution. > E.g. > > project1 standalone > project2 depends on project1.dll > > and build both projects. Dependencies are not correctly found now. Visual > Studio fails as well, but we could be better here :) > > [b.patch] address this issue (it uses AssemblyFolders from previous patch, > because this do not happen without it) > > Regards, > Martin > > btw: if someone is better English speaker than I am, please correct mine > comments in code > > > - Original Message - > From: "Jaroslaw Kowalski" <[EMAIL PROTECTED]> > To: "Martin Aliger" <[EMAIL PROTECTED]>; "! nant" > <[EMAIL PROTECTED]> > Sent: Monday, September 01, 2003 5:48 PM > Subject: Re: [nant-dev] solution task & assemblyfolders > > > > Hi all! > > > > That's a very good idea, however just by looking at your patch I see few > > problems: > > > > 1. When you have both VS.NET 2002 and VS.NET 2003 you actually have more > > registry keys to consider: > > > > HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.0\AssemblyFolders > > HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.0\AssemblyFolders > > HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.1\AssemblyFolders > > HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\AssemblyFolders > > > > where as a rule CURRENT_USER settings override the local machine. I think > > that the registry paths should be stored a part of the framework > > configuration in NAnt.exe.config. For mono on linux you would simply have > no > > paths to examine. > > > > 2. Looks like there's a mistake in your code: > > > > +FileSet af = _solutionTask.AssemblyFolders; > > +if(af.DirectoryNames.Count==0) > > af=_solutionTask.DefaultAssemlyFolders; > > + > > +foreach(string path in > > _solutionTask.AssemblyFolders.DirectoryNames) > > +{ > > +fiRef = new FileInfo(Path.Combine(path,justFilename)); > > +if ( fiRef.Exists ) > > +{ > > +_referenceFile = fiRef.FullName; > > +_baseDirectory = fiRef.DirectoryName; > > +return; > > +} > > +} > > > > You initialize local variable "af" to some fileset but iterate over > > "_solutionTask.AssemblyFolders.DirectoryNames" so obviously "af" is not > > used. I think it was meant to be "foreach(string path in > af.DirectoryNames)" > > > > 3. I think there should be an option to include/exclude > > "DefaultAssemblyFolders" from processing. In your patch there's a line: > > > > +if(af.DirectoryNames.Count==0) > > af=_solutionTask.DefaultAssemlyFolders; > > > > I think that the semantics should be: "process all directories specified > in > > the fileset PLUS any directories found via DefaultAssemblyFolders when the > > user asks for it" > > > > You would have a syntax like this. > > > > > > > > > > I think that this new option should default to "false". Having it > otherwise > > would be dangerous as it would by default introduce a dependency of the > > registry and might produce inconsistent results on different build > machines. > > > > Overall: the direction is good, but your patch still needs some work, > > Martin. You're very close, though. > > > > Jarek > > > > - Original Message - > > From: "Martin Aliger" <[EMAIL PROTECTED]> > > To: "! nant" <[EMAIL PROTECTED]> > > Sent: Monday, September 01, 2003 5:04 PM > > Subject: [nant
Re: [nant-dev] solution task & assemblyfolders
Hi again, I review mine patch I sent yesterday and fix problems Jarek found (thanks again) [solution.patch] There are still problem with registry read (which Matt point out) and I set new includevsfolders attribute default to true (VS compatible, not compatible with current nant, use registry read). 2/ I find problem with project dependencies when you are not explicitly use project dependency, but normal one and include dependent project into solution. E.g. project1 standalone project2 depends on project1.dll and build both projects. Dependencies are not correctly found now. Visual Studio fails as well, but we could be better here :) [b.patch] address this issue (it uses AssemblyFolders from previous patch, because this do not happen without it) Regards, Martin btw: if someone is better English speaker than I am, please correct mine comments in code - Original Message - From: "Jaroslaw Kowalski" <[EMAIL PROTECTED]> To: "Martin Aliger" <[EMAIL PROTECTED]>; "! nant" <[EMAIL PROTECTED]> Sent: Monday, September 01, 2003 5:48 PM Subject: Re: [nant-dev] solution task & assemblyfolders > Hi all! > > That's a very good idea, however just by looking at your patch I see few > problems: > > 1. When you have both VS.NET 2002 and VS.NET 2003 you actually have more > registry keys to consider: > > HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.0\AssemblyFolders > HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.0\AssemblyFolders > HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.1\AssemblyFolders > HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\AssemblyFolders > > where as a rule CURRENT_USER settings override the local machine. I think > that the registry paths should be stored a part of the framework > configuration in NAnt.exe.config. For mono on linux you would simply have no > paths to examine. > > 2. Looks like there's a mistake in your code: > > +FileSet af = _solutionTask.AssemblyFolders; > +if(af.DirectoryNames.Count==0) > af=_solutionTask.DefaultAssemlyFolders; > + > +foreach(string path in > _solutionTask.AssemblyFolders.DirectoryNames) > +{ > +fiRef = new FileInfo(Path.Combine(path,justFilename)); > +if ( fiRef.Exists ) > +{ > +_referenceFile = fiRef.FullName; > +_baseDirectory = fiRef.DirectoryName; > +return; > +} > +} > > You initialize local variable "af" to some fileset but iterate over > "_solutionTask.AssemblyFolders.DirectoryNames" so obviously "af" is not > used. I think it was meant to be "foreach(string path in af.DirectoryNames)" > > 3. I think there should be an option to include/exclude > "DefaultAssemblyFolders" from processing. In your patch there's a line: > > +if(af.DirectoryNames.Count==0) > af=_solutionTask.DefaultAssemlyFolders; > > I think that the semantics should be: "process all directories specified in > the fileset PLUS any directories found via DefaultAssemblyFolders when the > user asks for it" > > You would have a syntax like this. > > > > > I think that this new option should default to "false". Having it otherwise > would be dangerous as it would by default introduce a dependency of the > registry and might produce inconsistent results on different build machines. > > Overall: the direction is good, but your patch still needs some work, > Martin. You're very close, though. > > Jarek > > - Original Message - > From: "Martin Aliger" <[EMAIL PROTECTED]> > To: "! nant" <[EMAIL PROTECTED]> > Sent: Monday, September 01, 2003 5:04 PM > Subject: [nant-dev] solution task & assemblyfolders > > > > Hi all! > > > > I implement that subtag for as we discused it > > here. I hope my coding convention is ok (try to be close to yours). I'm > also > > totally confused by security checks. Have you any experience with enabling > > read from registry? [it is ok for me without it, but...] > > > > There will be some other matters regarding project dependencies and paths > > but I need to explore it first. > > > > Regards, > > Martin > > > > > solution.patch Description: Binary data b.patch Description: Binary data
[attn: Ian, Gert] Re: [nant-dev] solution task & assemblyfolders
It might be necessary to move the registry-reading functionality to a separate Win32-only task DLL. I'm not sure what the NAnt policy w.r.t. registry-reading tasks has been lately, but it seems that we are keeping Win32-dependent tasks separate from platform-independent ones. Ian or Gert - can you provide some input? Thanks, Matt. On Tue, 2003-09-02 at 03:16, Martin Aliger wrote: > Hi, > > 1/ true and agree. I write it pretty quickly. Could you (or someone else) > write that configuration stuff? > > 2/ yes. thanks to point it out! > > 3/ I want to simulate same behavior as Visual Studio. Dependancy on registry > read could be problem but if you use task it is very propable > that you use machine with Visual Studio. Of course - it _should_ be ok to > run it on mono as well (skiping registry read?). Your idea with > includevsfolders atribute is good, but I still think that default value > should be true. > > Thanks you, Jarek, for review. I'll revise my code today and address all > your comments. > > Martin > > - Original Message - > From: "Jaroslaw Kowalski" <[EMAIL PROTECTED]> > To: "Martin Aliger" <[EMAIL PROTECTED]>; "! nant" > <[EMAIL PROTECTED]> > Sent: Monday, September 01, 2003 5:48 PM > Subject: Re: [nant-dev] solution task & assemblyfolders > > > > Hi all! > > > > That's a very good idea, however just by looking at your patch I see few > > problems: > > > > 1. When you have both VS.NET 2002 and VS.NET 2003 you actually have more > > registry keys to consider: > > > > HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.0\AssemblyFolders > > HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.0\AssemblyFolders > > HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.1\AssemblyFolders > > HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\AssemblyFolders > > > > where as a rule CURRENT_USER settings override the local machine. I think > > that the registry paths should be stored a part of the framework > > configuration in NAnt.exe.config. For mono on linux you would simply have > no > > paths to examine. > > > > 2. Looks like there's a mistake in your code: > > > > +FileSet af = _solutionTask.AssemblyFolders; > > +if(af.DirectoryNames.Count==0) > > af=_solutionTask.DefaultAssemlyFolders; > > + > > +foreach(string path in > > _solutionTask.AssemblyFolders.DirectoryNames) > > +{ > > +fiRef = new FileInfo(Path.Combine(path,justFilename)); > > +if ( fiRef.Exists ) > > +{ > > +_referenceFile = fiRef.FullName; > > +_baseDirectory = fiRef.DirectoryName; > > +return; > > +} > > +} > > > > You initialize local variable "af" to some fileset but iterate over > > "_solutionTask.AssemblyFolders.DirectoryNames" so obviously "af" is not > > used. I think it was meant to be "foreach(string path in > af.DirectoryNames)" > > > > 3. I think there should be an option to include/exclude > > "DefaultAssemblyFolders" from processing. In your patch there's a line: > > > > +if(af.DirectoryNames.Count==0) > > af=_solutionTask.DefaultAssemlyFolders; > > > > I think that the semantics should be: "process all directories specified > in > > the fileset PLUS any directories found via DefaultAssemblyFolders when the > > user asks for it" > > > > You would have a syntax like this. > > > > > > > > > > I think that this new option should default to "false". Having it > otherwise > > would be dangerous as it would by default introduce a dependency of the > > registry and might produce inconsistent results on different build > machines. > > > > Overall: the direction is good, but your patch still needs some work, > > Martin. You're very close, though. > > > > Jarek > > > > - Original Message - > > From: "Martin Aliger" <[EMAIL PROTECTED]> > > To: "! nant" <[EMAIL PROTECTED]> > > Sent: Monday, September 01, 2003 5:04 PM > > Subject: [nant-dev] solution task & assemblyfolders > > > > > > > Hi all! > > > > > > I implement that subtag for as we discused > it > > > here. I hope my coding convention is ok (try to be close to yours). I'm > > also > > > to
Re: [nant-dev] solution task & assemblyfolders
Hi, 1/ true and agree. I write it pretty quickly. Could you (or someone else) write that configuration stuff? 2/ yes. thanks to point it out! 3/ I want to simulate same behavior as Visual Studio. Dependancy on registry read could be problem but if you use task it is very propable that you use machine with Visual Studio. Of course - it _should_ be ok to run it on mono as well (skiping registry read?). Your idea with includevsfolders atribute is good, but I still think that default value should be true. Thanks you, Jarek, for review. I'll revise my code today and address all your comments. Martin - Original Message - From: "Jaroslaw Kowalski" <[EMAIL PROTECTED]> To: "Martin Aliger" <[EMAIL PROTECTED]>; "! nant" <[EMAIL PROTECTED]> Sent: Monday, September 01, 2003 5:48 PM Subject: Re: [nant-dev] solution task & assemblyfolders > Hi all! > > That's a very good idea, however just by looking at your patch I see few > problems: > > 1. When you have both VS.NET 2002 and VS.NET 2003 you actually have more > registry keys to consider: > > HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.0\AssemblyFolders > HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.0\AssemblyFolders > HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.1\AssemblyFolders > HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\AssemblyFolders > > where as a rule CURRENT_USER settings override the local machine. I think > that the registry paths should be stored a part of the framework > configuration in NAnt.exe.config. For mono on linux you would simply have no > paths to examine. > > 2. Looks like there's a mistake in your code: > > +FileSet af = _solutionTask.AssemblyFolders; > +if(af.DirectoryNames.Count==0) > af=_solutionTask.DefaultAssemlyFolders; > + > +foreach(string path in > _solutionTask.AssemblyFolders.DirectoryNames) > +{ > +fiRef = new FileInfo(Path.Combine(path,justFilename)); > +if ( fiRef.Exists ) > +{ > +_referenceFile = fiRef.FullName; > +_baseDirectory = fiRef.DirectoryName; > +return; > +} > +} > > You initialize local variable "af" to some fileset but iterate over > "_solutionTask.AssemblyFolders.DirectoryNames" so obviously "af" is not > used. I think it was meant to be "foreach(string path in af.DirectoryNames)" > > 3. I think there should be an option to include/exclude > "DefaultAssemblyFolders" from processing. In your patch there's a line: > > +if(af.DirectoryNames.Count==0) > af=_solutionTask.DefaultAssemlyFolders; > > I think that the semantics should be: "process all directories specified in > the fileset PLUS any directories found via DefaultAssemblyFolders when the > user asks for it" > > You would have a syntax like this. > > > > > I think that this new option should default to "false". Having it otherwise > would be dangerous as it would by default introduce a dependency of the > registry and might produce inconsistent results on different build machines. > > Overall: the direction is good, but your patch still needs some work, > Martin. You're very close, though. > > Jarek > > - Original Message - > From: "Martin Aliger" <[EMAIL PROTECTED]> > To: "! nant" <[EMAIL PROTECTED]> > Sent: Monday, September 01, 2003 5:04 PM > Subject: [nant-dev] solution task & assemblyfolders > > > > Hi all! > > > > I implement that subtag for as we discused it > > here. I hope my coding convention is ok (try to be close to yours). I'm > also > > totally confused by security checks. Have you any experience with enabling > > read from registry? [it is ok for me without it, but...] > > > > There will be some other matters regarding project dependencies and paths > > but I need to explore it first. > > > > 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
Re: [nant-dev] solution task & assemblyfolders
Hi all! That's a very good idea, however just by looking at your patch I see few problems: 1. When you have both VS.NET 2002 and VS.NET 2003 you actually have more registry keys to consider: HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.0\AssemblyFolders HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.0\AssemblyFolders HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\7.1\AssemblyFolders HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\AssemblyFolders where as a rule CURRENT_USER settings override the local machine. I think that the registry paths should be stored a part of the framework configuration in NAnt.exe.config. For mono on linux you would simply have no paths to examine. 2. Looks like there's a mistake in your code: +FileSet af = _solutionTask.AssemblyFolders; +if(af.DirectoryNames.Count==0) af=_solutionTask.DefaultAssemlyFolders; + +foreach(string path in _solutionTask.AssemblyFolders.DirectoryNames) +{ +fiRef = new FileInfo(Path.Combine(path,justFilename)); +if ( fiRef.Exists ) +{ +_referenceFile = fiRef.FullName; +_baseDirectory = fiRef.DirectoryName; +return; +} +} You initialize local variable "af" to some fileset but iterate over "_solutionTask.AssemblyFolders.DirectoryNames" so obviously "af" is not used. I think it was meant to be "foreach(string path in af.DirectoryNames)" 3. I think there should be an option to include/exclude "DefaultAssemblyFolders" from processing. In your patch there's a line: +if(af.DirectoryNames.Count==0) af=_solutionTask.DefaultAssemlyFolders; I think that the semantics should be: "process all directories specified in the fileset PLUS any directories found via DefaultAssemblyFolders when the user asks for it" You would have a syntax like this. I think that this new option should default to "false". Having it otherwise would be dangerous as it would by default introduce a dependency of the registry and might produce inconsistent results on different build machines. Overall: the direction is good, but your patch still needs some work, Martin. You're very close, though. Jarek - Original Message - From: "Martin Aliger" <[EMAIL PROTECTED]> To: "! nant" <[EMAIL PROTECTED]> Sent: Monday, September 01, 2003 5:04 PM Subject: [nant-dev] solution task & assemblyfolders > Hi all! > > I implement that subtag for as we discused it > here. I hope my coding convention is ok (try to be close to yours). I'm also > totally confused by security checks. Have you any experience with enabling > read from registry? [it is ok for me without it, but...] > > There will be some other matters regarding project dependencies and paths > but I need to explore it first. > > 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
[nant-dev] solution task & assemblyfolders
Hi all! I implement that subtag for as we discused it here. I hope my coding convention is ok (try to be close to yours). I'm also totally confused by security checks. Have you any experience with enabling read from registry? [it is ok for me without it, but...] There will be some other matters regarding project dependencies and paths but I need to explore it first. Regards, Martin a.patch Description: Binary data