RE: [nant-dev] Another Solution Task suggestion

2003-09-09 Thread Eddie Tse
At the moment obj files are compiled to a temp directory that gets removed
after a compile anyway.  I am thinking maybe change to store obj files under
the obj/target directory just like vs.net, this way compilation can
potentially speed up as it doesn't have to recompiled unchanged files like
resources etc when you want to do a quick test build.

Another option is maybe delete the whole output directory.   Suggestions?


Eddie

-Original Message-
From: Erick Thompson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 9 September 2003 3:05 AM
To: Eddie Tse; [EMAIL PROTECTED]
Subject: RE: [nant-dev] Another Solution Task suggestion

I personally love this feature. Would it also remove all obj files, and
all other temporary files, leaving only the project items?

Thanks,
Erick

 -Original Message-
 From: Eddie Tse [mailto:[EMAIL PROTECTED]
 Sent: Saturday, September 06, 2003 7:29 AM
 To: [EMAIL PROTECTED]
 Subject: [nant-dev] Another Solution Task suggestion
 
 
 Hi All,
 
 I've made a quick patch to add a clean action to the solution task.
 Basically it will remove all the primary output files.  I 
 would like some
 feedback on this.
 
 solution solutionfile=WindowsApplication.sln configuration=debug
 action=Clean 
 /solution
 
 Cheers,
 
 Eddie
 
 




---
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] Another Solution Task suggestion

2003-09-09 Thread Martin Aliger
I don't like to use subdirectory of current path. Could be read only...

Maybe we could add some attribute to do build instead of rebuild?

 Martin

 - Original Message - 
 From: Eddie Tse [EMAIL PROTECTED]
 To: 'Erick Thompson' [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Tuesday, September 09, 2003 3:18 PM
 Subject: RE: [nant-dev] Another Solution Task suggestion


  At the moment obj files are compiled to a temp directory that gets
removed
  after a compile anyway.  I am thinking maybe change to store obj files
 under
  the obj/target directory just like vs.net, this way compilation can
  potentially speed up as it doesn't have to recompiled unchanged files
like
  resources etc when you want to do a quick test build.
 
  Another option is maybe delete the whole output directory.
Suggestions?
 
 
  Eddie
 
  -Original Message-
  From: Erick Thompson [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, 9 September 2003 3:05 AM
  To: Eddie Tse; [EMAIL PROTECTED]
  Subject: RE: [nant-dev] Another Solution Task suggestion
 
  I personally love this feature. Would it also remove all obj files, and
  all other temporary files, leaving only the project items?
 
  Thanks,
  Erick
 
   -Original Message-
   From: Eddie Tse [mailto:[EMAIL PROTECTED]
   Sent: Saturday, September 06, 2003 7:29 AM
   To: [EMAIL PROTECTED]
   Subject: [nant-dev] Another Solution Task suggestion
  
  
   Hi All,
  
   I've made a quick patch to add a clean action to the solution task.
   Basically it will remove all the primary output files.  I
   would like some
   feedback on this.
  
   solution solutionfile=WindowsApplication.sln configuration=debug
   action=Clean 
   /solution
  
   Cheers,
  
   Eddie
  
  
 
 
 
 
  ---
  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
 
 





---
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] Another Solution Task suggestion

2003-09-06 Thread Eddie Tse
Hi All,

I've made a quick patch to add a clean action to the solution task.
Basically it will remove all the primary output files.  I would like some
feedback on this.

solution solutionfile=WindowsApplication.sln configuration=debug
action=Clean 
/solution

Cheers,

Eddie

? patch.txt
Index: ConfigurationSettings.cs
===
RCS file: /cvsroot/nant/nant/src/NAnt.VSNet/ConfigurationSettings.cs,v
retrieving revision 1.10
diff -u -r1.10 ConfigurationSettings.cs
--- ConfigurationSettings.cs27 Aug 2003 16:55:10 -  1.10
+++ ConfigurationSettings.cs6 Sep 2003 14:27:04 -
@@ -19,6 +19,7 @@
 using System.Globalization;
 using System.IO;
 using System.Collections;
+using System.Collections.Specialized;
 using System.Xml;
 
 using NAnt.Core;
@@ -66,6 +67,13 @@
 Directory.CreateDirectory(Path.GetDirectoryName(_docFilename));
 }
 
+string debugValue;
+if (!StringUtils.IsNullOrEmpty(debugValue = 
elemConfig.GetAttribute(DebugSymbols))) {
+if (debugValue == true) {
+_pdbFilename = Path.Combine(_outputPath, 
this._projectSettings.Name + .pdb);
+}
+}
+
 _solutionTask.Log(Level.Debug, _solutionTask.LogPrefix + Project: {0} 
Relative Output Path: {1} Output Path: {2} Documentation Path: {3}, 
 projectSettings.Name, _relativeOutputPath, _outputPath, _docFilename);
 
@@ -115,11 +123,19 @@
 
 public string[] ExtraOutputFiles {
 get {
-if (_docFilename == null) {
-return new string[0];
+StringCollection extraFiles = new StringCollection();
+
+if (_docFilename != null) {
+extraFiles.Add(_docFilename);
+}
+
+if (_pdbFilename != null) {
+extraFiles.Add(_pdbFilename);
 }
 
-return new string[] {_docFilename};
+string[] extraFilesArray = new string[extraFiles.Count];
+extraFiles.CopyTo(extraFilesArray, 0);
+return extraFilesArray;
 }
 }
 
@@ -149,6 +165,7 @@
 
 private ArrayList _settings;
 private string _docFilename;
+private string _pdbFilename;
 private string _relativeOutputPath;
 private string _outputPath;
 private string _name;
Index: Project.cs
===
RCS file: /cvsroot/nant/nant/src/NAnt.VSNet/Project.cs,v
retrieving revision 1.17
diff -u -r1.17 Project.cs
--- Project.cs  2 Sep 2003 18:52:29 -   1.17
+++ Project.cs  6 Sep 2003 14:27:06 -
@@ -234,6 +234,34 @@
 }
 }
 
+public bool Clean(string configuration) {
+ConfigurationSettings cs = (ConfigurationSettings) 
_htConfigurations[configuration];
+if (cs == null) {
+Log(Level.Info, _solutionTask.LogPrefix + Configuration {0} does not 
exist, skipping., configuration);
+return true;
+}
+
+// Setup delete task
+DeleteTask dt = new DeleteTask();
+dt.InitializeTaskConfiguration();
+dt.Project = this._solutionTask.Project;
+dt.FailOnError = false;
+dt.Verbose = this._solutionTask.Verbose;
+
+// Clean primary output
+dt.DeleteFileSet.FileNames.Add(cs.FullOutputFile);
+
+// Clean extra output
+foreach (string file in cs.ExtraOutputFiles) {
+dt.DeleteFileSet.FileNames.Add(file);
+}
+
+// Execute delete task
+dt.Execute();
+
+return true;
+}
+
 public bool Compile(string configuration, ArrayList alCSCArguments, string 
strLogFile, bool bVerbose, bool bShowCommands) {
 bool bSuccess = true;
 
Index: Solution.cs
===
RCS file: /cvsroot/nant/nant/src/NAnt.VSNet/Solution.cs,v
retrieving revision 1.13
diff -u -r1.13 Solution.cs
--- Solution.cs 2 Sep 2003 19:01:33 -   1.13
+++ Solution.cs 6 Sep 2003 14:27:08 -
@@ -49,13 +49,13 @@
 
 string fileContents;
 
-using (StreamReader sr = new StreamReader(solutionFileName)) {
+using (StreamReader sr = new StreamReader(_solutionTask.SolutionFile)) {
 fileContents = sr.ReadToEnd();
 }
 
 Regex re = new 
Regex(@Project\(\(?package\{.*?\})\.*?\(?name.*?)\.*?\(?project.*?)\.*?\(?guid.*?)\);
 MatchCollection mc = re.Matches(fileContents);
-FileInfo fiSolution = new FileInfo(solutionFileName);
+FileInfo fiSolution = new FileInfo(_solutionTask.SolutionFile);
 
 foreach (Match m in mc) {
 string project = m.Groups[project].Value;
@@ -181,6