RE: [nant-dev] solution task bug in nested build

2003-11-05 Thread Eddie Tse
Ok tested with the latest nightly builds, it works.

Thanks!!

-Original Message-
From: Gert Driesen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 4 November 2003 5:29 PM
To: Eddie Tse; [EMAIL PROTECTED]
Subject: Re: [nant-dev] solution task bug in nested build

What version of NAnt are you using ?  This should actually already be fixed
in the 0.8.4 nightly builds, but not by that patch you supplied ... Earlier
versions of the solution task did not resolve the solution filename to a
full path in SolutionTask.cs, this was fixed since ...

Can you try one of the recent nightly builds
(http://nant.sourceforge.net/nightly/builds) ?

Thanks,

Gert
- Original Message - 
From: Eddie Tse [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 03, 2003 11:08 PM
Subject: [nant-dev] solution task bug in nested build


 Hi All,

 I have a large multi-solution project and the solution task does not build
 properly if it is called within a nested nant task because the full path
 to the solution file is not used.  Patch attached.


 Cheers,

 Eddie


 Index: src/NAnt.VSNet/Solution.cs
 ===
 RCS file: /cvsroot/nant/nant/src/NAnt.VSNet/Solution.cs,v
 retrieving revision 1.19
 diff -u -r1.19 Solution.cs
 --- src/NAnt.VSNet/Solution.cs 3 Nov 2003 09:46:04 - 1.19
 +++ src/NAnt.VSNet/Solution.cs 3 Nov 2003 22:03:50 -
 @@ -51,13 +51,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.*?)\.*?\(?proj
 ect.*?)\.*?\(?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;



 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?   SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 nant-developers mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-developers






---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] solution task bug in nested build

2003-11-03 Thread Eddie Tse
Hi All,

I have a large multi-solution project and the solution task does not build
properly if it is called within a nested nant task because the full path
to the solution file is not used.  Patch attached.


Cheers,

Eddie


Index: src/NAnt.VSNet/Solution.cs
===
RCS file: /cvsroot/nant/nant/src/NAnt.VSNet/Solution.cs,v
retrieving revision 1.19
diff -u -r1.19 Solution.cs
--- src/NAnt.VSNet/Solution.cs  3 Nov 2003 09:46:04 -   1.19
+++ src/NAnt.VSNet/Solution.cs  3 Nov 2003 22:03:50 -
@@ -51,13 +51,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.*?)\.*?\(?proj
ect.*?)\.*?\(?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;



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
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 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


[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 

RE: [nant-dev] solution task question

2003-09-02 Thread Eddie Tse
I noticed this today as well with the solution task and it is not the same
behaviour using VS.NET.  For me, unreferenced assemblies do not get copied
by VS.NET to the output directory.  It only copies assemblies that are
referenced directly in your project file or indirectly by a referenced
assembly which it can find via the reference path.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tom
Cabanski
Sent: Tuesday, 2 September 2003 10:21 PM
To: Martin Aliger; [EMAIL PROTECTED]
Subject: RE: [nant-dev] solution task question

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





---
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 fixes

2003-08-30 Thread Eddie Tse
How about this.

Index: Solution.cs
===
RCS file: /cvsroot/nant/nant/src/NAnt.VSNet/Solution.cs,v
retrieving revision 1.8
diff -u -r1.8 Solution.cs
--- Solution.cs 17 Aug 2003 08:46:53 -  1.8
+++ Solution.cs 23 Aug 2003 23:51:15 -
@@ -61,6 +61,12 @@
 string guid = m.Groups[guid].Value;
 string fullPath;
 
+// only supports vb and cs projects
+if (!project.ToLower().EndsWith(.csproj) 
!project.ToLower().EndsWith(.vbproj)) {
+_solutionTask.Log(Level.Info, Currently only supports
VB and CS projects. Skipping {0}., project);
+continue;
+}
+
 try {
 // translate URLs to physical paths if using a webmap
 WebMap map = _webMaps[project];

-Original Message-
From: Matthew Mastracci [mailto:[EMAIL PROTECTED] 
Sent: Saturday, 23 August 2003 1:11 AM
To: Eddie Tse
Cc: [EMAIL PROTECTED]
Subject: Re: [nant-dev] solution task fixes

Eddie - ignoring non-csproj and non-vbproj files looks good.  We 
shouldn't do this without at least warning the user that we are ignoring 
their projects, however.  Can you add a log message to this test?




---
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 patch

2003-08-30 Thread Eddie Tse
Hi,

If you call another build file in a sub directory using the nant task and
the nested build file contains a solution task   The path name used by the
nested solution task is not correct.  This patch fixes that problem.


Cheers,

Eddie




Index: Solution.cs
===
RCS file: /cvsroot/nant/nant/src/NAnt.VSNet/Solution.cs,v
retrieving revision 1.10
diff -u -r1.10 Solution.cs
--- Solution.cs 24 Aug 2003 19:56:47 -  1.10
+++ Solution.cs 25 Aug 2003 12:04:47 -
@@ -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.*?)\.*?\(?proj
ect.*?)\.*?\(?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;



---
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 fixes

2003-08-22 Thread Eddie Tse
Hi All,

I've been experimenting with the solution task from CVS and had made a few
changes in order to make it work for me.

Added the NoWarn option from VS.NET 2003
I have SQL projects as well as deployment projects in my solution, so
ignored those.
And the webmapcollection was using the path instead of the url to retrieve
the webmap object.



Index: ConfigurationSettings.cs
===
RCS file: /cvsroot/nant/nant/src/NAnt.VSNet/ConfigurationSettings.cs,v
retrieving revision 1.5
diff -u -r1.5 ConfigurationSettings.cs
--- ConfigurationSettings.cs17 Aug 2003 08:46:53 -  1.5
+++ ConfigurationSettings.cs21 Aug 2003 13:54:48 -
@@ -70,6 +70,7 @@
 
 if (projectSettings.Type == ProjectType.CSharp) {
 htStringSettings[WarningLevel] = /warn:{0};
+htStringSettings[NoWarn] = /nowarn:{0};
 htBooleanSettings[IncrementalBuild] = /incremental;
 }
 
Index: Solution.cs
===
RCS file: /cvsroot/nant/nant/src/NAnt.VSNet/Solution.cs,v
retrieving revision 1.8
diff -u -r1.8 Solution.cs
--- Solution.cs 17 Aug 2003 08:46:53 -  1.8
+++ Solution.cs 21 Aug 2003 13:54:52 -
@@ -61,6 +61,11 @@
 string guid = m.Groups[guid].Value;
 string fullPath;
 
+// only supports vb and cs projects
+if (!project.ToLower().EndsWith(.csproj) 
!project.ToLower().EndsWith(.vbproj)) {
+continue;
+}
+
 try {
 // translate URLs to physical paths if using a webmap
 WebMap map = _webMaps[project];
Index: Types/WebMapCollection.cs
===
RCS file: /cvsroot/nant/nant/src/NAnt.VSNet/Types/WebMapCollection.cs,v
retrieving revision 1.1
diff -u -r1.1 WebMapCollection.cs
--- Types/WebMapCollection.cs   17 Aug 2003 08:37:51 -  1.1
+++ Types/WebMapCollection.cs   21 Aug 2003 13:54:53 -
@@ -75,7 +75,7 @@
 if (value != null) {
 // Try to locate instance using Value
 foreach (WebMap WebMap in base.List) {
-if (value.Equals(WebMap.Path)) {
+if (value.Equals(WebMap.Url)) {
 return WebMap;
 }
 }


---
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
___
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers