[nant-dev] patch suggestion - Resgen task
Hi all, I was quite long away, but now again working with NANT. I need some changes, so there is what I suggest. I will try get smaller blocks to be easy. First RESGEN. It writes some annoying messages even when verbose=false. It goes to ExternalProgramBase.cs: --- E:\src\nant\distrib\NAnt.Core\Tasks\ExternalProgramBase.cs Fri Jun 27 19:00:54 2003 +++ ExternalProgramBase.cs Tue Aug 19 19:02:18 2003 @@ -323,7 +323,7 @@ lock (_htThreadStream) { logger.Info(strLogContents); //do not print LogPrefix, just pad that length. -Log(Level.Info, new string(char.Parse( ), LogPrefix.Length) + strLogContents); +Log(Level.Verbose, new string(char.Parse( ), LogPrefix.Length) + strLogContents); if (OutputFile != null OutputFile.Length != 0) { StreamWriter writer = new StreamWriter(OutputFile, doAppend); @@ -345,7 +345,7 @@ lock (_htThreadStream) { logger.Error(strLogContents); //do not print LogPrefix, just pad that length. -Log(Level.Info, new string(char.Parse( ), LogPrefix.Length) + strLogContents); +Log(Level.Error, new string(char.Parse( ), LogPrefix.Length) + strLogContents); if (OutputFile != null OutputFile.Length != 0) { StreamWriter writer = new StreamWriter(OutputFile, OutputAppend); Martin -- Created by Email.cz http://www.email.cz -- Get Your Free Email -- Created by Email.cz http://www.email.cz -- Get Your Free Email --- 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
[nant-dev] NUnit2Task Default Formatter
Hi, when working with NUnit2Task I saw that the output of the test always showed up twice when specifying a formatter. This is caused by always adding a defaultFormatter, even when there are formatters specified. Added: if (_formatterElements.Count == 0) The patch is copied below, also attached as NUnit2Task.patch Jasper. - Index: src/NAnt.NUnit/NUnit2/NUnit2Task.cs === RCS file: /cvsroot/nant/nant/src/NAnt.NUnit/NUnit2/NUnit2Task.cs,v retrieving revision 1.19 diff -u -r1.19 NUnit2Task.cs --- src/NAnt.NUnit/NUnit2/NUnit2Task.cs 25 May 2003 08:20:26 - 1.19 +++ src/NAnt.NUnit/NUnit2/NUnit2Task.cs 19 Aug 2003 15:30:11 - @@ -124,11 +124,13 @@ /// /summary /// param name=taskNodesee cref=XmlNode / containing the XML fragment used to initialize this task instance./param protected override void InitializeTask(XmlNode taskNode) { -FormatterElement defaultFormatter = new FormatterElement(); -defaultFormatter.Project = Project; -defaultFormatter.Type = FormatterType.Plain; -defaultFormatter.UseFile = false; -_formatterElements.Add(defaultFormatter); +if (_formatterElements.Count == 0) { +FormatterElement defaultFormatter = new FormatterElement(); +defaultFormatter.Project = Project; +defaultFormatter.Type = FormatterType.Plain; +defaultFormatter.UseFile = false; +_formatterElements.Add(defaultFormatter); +} } /// summary @@ -340,4 +342,4 @@ #endregion Private Instance Fields } } -} \ No newline at end of file +} NUnit2Task.patch Description: NUnit2Task.patch
[nant-dev] last suggestion - Solution task again
Last one - and I'm not sure there. There are problems with references between projects when projects have different output paths. Project references are ok, but external refenreces sometimes brokes. Currently nant compares files as full pathnames using path from HintPath attribute. I suggest to compare filenames as names only without path. Could this be a problem? It works for me, but... Btw: Visual studio is real mess in this. Hope nant could be better! :) I send patch I made, but consider this as suggestion, not real patch Thanks! Martin -- Created by Email.cz http://www.email.cz -- Get Your Free Email -- Created by Email.cz http://www.email.cz -- Get Your Free Email --- E:\src\nant\distrib\NAnt.VSNet\Solution.cs Fri Jul 25 10:07:28 2003 +++ E:\src\nant\src\NAnt.VSNet\Solution.cs Tue Aug 19 18:41:12 2003 @@ -181,11 +180,11 @@ foreach ( DictionaryEntry de in _htProjects ) { string strGUID = ( string )de.Key; Project p = ( Project )de.Value; - +/* ??without path?? foreach ( string strConfiguration in p.Configurations ) { -//Console.WriteLine( {0} [{1}] - {2}, p.Name, strConfiguration, p.GetConfigurationSettings( strConfiguration ).FullOutputFile.ToLower() ); -_htOutputFiles[ p.GetConfigurationSettings( strConfiguration ).FullOutputFile.ToLower() ] = strGUID; -} +_htOutputFiles[ GetConfigurationSettings( strConfiguration ).FullOutputFile .ToLower() ] = strGUID; +} */ +_htOutputFiles[ p.ProjectSettings.OutputFile.ToLower() ] = strGUID; } // Then build the dependency list @@ -196,8 +195,12 @@ foreach ( Reference r in p.References ) { if ( r.IsProjectReference ) AddProjectDependency( strGUID, r.ProjectReferenceGUID ); -else if ( _htOutputFiles.Contains( r.Filename.ToLower() ) ) -AddProjectDependency( strGUID, ( string )_htOutputFiles[ r.Filename.ToLower() ] ); +else + { + string refName = Path.GetFileName(r.Filename).ToLower(); /* ??without path?? r.Filename.ToLower()*/ + if ( _htOutputFiles.Contains( refName ) ) + AddProjectDependency( strGUID, ( string )_htOutputFiles[ refName ] ); + } } } } @@ -231,24 +234,29 @@ if ( !bFailed ) { // Fixup references -//Console.WriteLine( Fixing up references... ); +//_nanttask.Log(Level.Info, _nanttask.LogPrefix + Fixing up references... ); foreach ( Reference r in p.References ) { -//Console.WriteLine( Original: {0}, r.Filename ); if ( r.IsProjectReference ) { + // Console.WriteLine( Original: project {0} {1}, r.Filename,r.ProjectReferenceGUID ); Project pRef = ( Project )_htProjects[ r.ProjectReferenceGUID ]; if ( pRef == null ) throw new Exception( Unable to locate referenced project while loading + p.Name ); if ( pRef.GetConfigurationSettings( strConfiguration ) == null ) -throw new Exception( Unable to find appropriate configuration for project reference ); +throw new Exception( String.Format( Unable to find appropriate configuration ({0}) for project reference {1}, strConfiguration, GetProjectFileFromGUID(pRef.GUID) )); if ( pRef != null ) r.Filename = pRef.GetConfigurationSettings( strConfiguration ).FullOutputFile.ToLower(); } -else if ( _htOutputFiles.Contains( r.Filename.ToLower() ) ) { -Project pRef = ( Project )_htProjects[ ( string )_htOutputFiles[ r.Filename.ToLower() ] ]; -if ( pRef != null pRef.GetConfigurationSettings( strConfiguration ) != null ) -r.Filename = pRef.GetConfigurationSettings( strConfiguration ).FullOutputFile.ToLower(); -} - +else + { +//Console.WriteLine( Original: external {0}, r.Filename ); + string refName =
[nant-dev] solution task fixes
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
[nant-dev] foreach
I am not able to figure out what is the problem in below fragment.. it use to work before echo message=${OutputFolder}/ foreach item=File property=filename in items in=${OutputFolder} includes name=**/m*.dll/ includes name=**/m*.exe/ /items /in do regex pattern=^(?'outputfilename'.*)\.(?'extension'\w+)$ input=${filename}/ exec program=fxcopcmd commandline=/f:${filename} /r:${OutputFolder}\RNWSFxCopRules.dll /o:${outputfilename}.xml / echo message=${filename}/ /do /foreach This should give me the list of all filename starting with m.. spend an hour in resolving this issue but no luck... Regards Yogesh S _ Over 6,70,000 brides and grooms. http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Click here to join for free. --- 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
RE: [nant-dev] foreach
Hi Yogesh, items is a fileset, so the attribute should be basedir instead of in. this works for me: ?xml version=1.0? project name=test description=test default=test property name=OutputFolder value=C:/Dir// target name=test foreach item=File property=filename in items basedir=${OutputFolder} includes name=**/m*.dll/ includes name=**/m*.exe/ /items /in do regex pattern=^(?'outputfilename'.*)\.(?'extension'\w+)$ input=${filename}/ !-- Do your fxcop thing here -- echo message=${filename} / /do /foreach /target /project Regards, Jasper. -Original Message- From: Yogesh Shetty [mailto:[EMAIL PROTECTED] Sent: donderdag 21 augustus 2003 13:23 To: [EMAIL PROTECTED] Subject: [nant-dev] foreach I am not able to figure out what is the problem in below fragment.. it use to work before echo message=${OutputFolder}/ foreach item=File property=filename in items in=${OutputFolder} includes name=**/m*.dll/ includes name=**/m*.exe/ /items /in do regex pattern=^(?'outputfilename'.*)\.(?'extension'\w+)$ input=${filename}/ exec program=fxcopcmd commandline=/f:${filename} /r:${OutputFolder}\RNWSFxCopRules.dll /o:${outputfilename}.xml / echo message=${filename}/ /do /foreach This should give me the list of all filename starting with m.. spend an hour in resolving this issue but no luck... Regards Yogesh S _ Over 6,70,000 brides and grooms. http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Click here to join for free. --- 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 --- 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
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? Eddie Tse wrote: 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.cs 17 Aug 2003 08:46:53 - 1.5 +++ ConfigurationSettings.cs 21 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 --- 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
Re: [nant-dev] last suggestion - Solution task again
I'd recommend against comparing only filenames. This will likely end up causing trouble down the line. VS.NET is certainly a mess when it comes to hint paths, but I've found that they are generally accurate. I don't even think it uses them half of the time. :) Can you describe your situation with more detail (perhaps some examples) so I can see what is happening?. Martin Aliger wrote: Last one - and I'm not sure there. There are problems with references between projects when projects have different output paths. Project references are ok, but external refenreces sometimes brokes. Currently nant compares files as full pathnames using path from HintPath attribute. I suggest to compare filenames as names only without path. Could this be a problem? It works for me, but... Btw: Visual studio is real mess in this. Hope nant could be better! :) I send patch I made, but consider this as suggestion, not real patch Thanks! Martin -- Created by Email.cz http://www.email.cz -- Get Your Free Email -- Created by Email.cz http://www.email.cz -- Get Your Free Email --- E:\src\nant\distrib\NAnt.VSNet\Solution.cs Fri Jul 25 10:07:28 2003 +++ E:\src\nant\src\NAnt.VSNet\Solution.cs Tue Aug 19 18:41:12 2003 @@ -181,11 +180,11 @@ foreach ( DictionaryEntry de in _htProjects ) { string strGUID = ( string )de.Key; Project p = ( Project )de.Value; - +/* ??without path?? foreach ( string strConfiguration in p.Configurations ) { -//Console.WriteLine( {0} [{1}] - {2}, p.Name, strConfiguration, p.GetConfigurationSettings( strConfiguration ).FullOutputFile.ToLower() ); -_htOutputFiles[ p.GetConfigurationSettings( strConfiguration ).FullOutputFile.ToLower() ] = strGUID; -} +_htOutputFiles[ GetConfigurationSettings( strConfiguration ).FullOutputFile .ToLower() ] = strGUID; +} */ +_htOutputFiles[ p.ProjectSettings.OutputFile.ToLower() ] = strGUID; } // Then build the dependency list @@ -196,8 +195,12 @@ foreach ( Reference r in p.References ) { if ( r.IsProjectReference ) AddProjectDependency( strGUID, r.ProjectReferenceGUID ); -else if ( _htOutputFiles.Contains( r.Filename.ToLower() ) ) -AddProjectDependency( strGUID, ( string )_htOutputFiles[ r.Filename.ToLower() ] ); +else + { + string refName = Path.GetFileName(r.Filename).ToLower(); /* ??without path?? r.Filename.ToLower()*/ + if ( _htOutputFiles.Contains( refName ) ) + AddProjectDependency( strGUID, ( string )_htOutputFiles[ refName ] ); + } } } } @@ -231,24 +234,29 @@ if ( !bFailed ) { // Fixup references -//Console.WriteLine( Fixing up references... ); +//_nanttask.Log(Level.Info, _nanttask.LogPrefix + Fixing up references... ); foreach ( Reference r in p.References ) { -//Console.WriteLine( Original: {0}, r.Filename ); if ( r.IsProjectReference ) { + // Console.WriteLine( Original: project {0} {1}, r.Filename,r.ProjectReferenceGUID ); Project pRef = ( Project )_htProjects[ r.ProjectReferenceGUID ]; if ( pRef == null ) throw new Exception( Unable to locate referenced project while loading + p.Name ); if ( pRef.GetConfigurationSettings( strConfiguration ) == null ) -throw new Exception( Unable to find appropriate configuration for project reference ); +throw new Exception( String.Format( Unable to find appropriate configuration ({0}) for project reference {1}, strConfiguration, GetProjectFileFromGUID(pRef.GUID) )); if ( pRef != null ) r.Filename = pRef.GetConfigurationSettings( strConfiguration ).FullOutputFile.ToLower(); } -else if ( _htOutputFiles.Contains( r.Filename.ToLower() ) ) { -Project pRef = ( Project )_htProjects[ ( string )_htOutputFiles[ r.Filename.ToLower() ] ]; -if ( pRef != null pRef.GetConfigurationSettings( strConfiguration ) != null ) -r.Filename =
Re: [nant-dev] NUnit Config
No, it's not. It's an attribute of a build element/type, not a task. For now, only tasks (and their attributes) are documented. Gert - Original Message - From: Yogesh Shetty [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, August 21, 2003 1:23 PM Subject: Re: [nant-dev] NUnit Config Thx... is this attribute documented... i may have overlooked it... From: Gert Driesen [EMAIL PROTECTED] To: Yogesh Shetty [EMAIL PROTECTED],[EMAIL PROTECTED] Subject: Re: [nant-dev] NUnit Config Date: Wed, 20 Aug 2003 18:05:20 +0200 Hi Yogesh, The test element has a appconfig attribute that can be used to set the application configuration file that should be used. Gert - Original Message - From: Yogesh Shetty [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 4:33 PM Subject: [nant-dev] NUnit Config I have below fragment placed in a build file nunit2 basedir=${OutputFolder} failonerror=false test assemblyname=${OutputFolder}/UnitTest.dll / /nunit2 The problem is my test cases are dependent on configuration file which are stored in UnitTest.dll.config and read using Microsoft Configuration Application Block. The test cases works fine, it can read / write information to/from configruation file, when tested using NUnit-Gui or NUnit-Console app. But when the same test case is executed using the NAnt task it fails ( not able to locate the config file ) As we all know NUnit creates a separate appdomain and points the applicationconfiguration file to the physical path of the assembly it loaded but whereas using NAnt it points to the launch directory of the nant application instead of test asssembly path. Regards Yogesh S _ MSN Messenger V6.0. Give it a fun name. http://server1.msn.co.in/sp03/ilovemessenger/index.asp Win cool stuff! --- This SF.net email is sponsored by Dice.com. Did you know that Dice has over 25,000 tech jobs available today? From careers in IT to Engineering to Tech Sales, Dice has tech jobs from the best hiring companies. http://www.dice.com/index.epl?rel_code=104 ___ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers --- This SF.net email is sponsored by Dice.com. Did you know that Dice has over 25,000 tech jobs available today? From careers in IT to Engineering to Tech Sales, Dice has tech jobs from the best hiring companies. http://www.dice.com/index.epl?rel_code=104 ___ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers _ Formula 1 fan? This is for you! http://server1.msn.co.in/sp03/formula2003/photogallery/gallery/gal3.asp Best pics of the year. --- 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 --- 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
[nant-dev] Patch for Solution Task
Solution task sometimes puts two dots in resource names where there should only be one. This patch fixes the problem. Can someone apply it for me? The patch is inline below my signature. Thanks - Tom Cabanski, President Objective Advantage, Inc. http://www.oai.cc Phone: +1-281-348-2517x15 cvs diff Resource.cs (in directory C:\cvsroot\nant\src\NAnt.VSNet\) Index: Resource.cs === RCS file: /cvsroot/nant/nant/src/NAnt.VSNet/Resource.cs,v retrieving revision 1.13 diff -r1.13 Resource.cs 22a23 using System.Text; 222c223,234 strOutFile = _projectSettings.RootNamespace + . + Path.GetDirectoryName(_resourceSourceFileRelativePath).Replace(\\, .) + . + Path.GetFileNameWithoutExtension(_resourceSourceFile) + .resources; --- StringBuilder sb = new StringBuilder(); if (_projectSettings.RootNamespace.Trim().Length 0) { sb.Append(_projectSettings.RootNamespace); } if (Path.GetDirectoryName(_resourceSourceFileRelativePath).Length 0) { sb.AppendFormat(.{0}, Path.GetDirectoryName(_resourceSourceFileRelativePath).Replace(\\, .)); } if (_resourceSourceFile.Trim().Length 0) { sb.AppendFormat(.{0}, Path.GetFileNameWithoutExtension(_resourceSourceFile)); } sb.Append(.resources); strOutFile = sb.ToString(); --- 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
Re: [nant-dev] NUnit2Task Default Formatter
Hi Jasper, I'm not sure if this is the correct fix for this issue ... I'd rather remove the default formatter altogether, but that would break backward compatibility. But if we can correct wrong behaviour, we should do it as soon as possible ... Ian, what do you think ? Gert - Original Message - From: Jasper Keuper [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 5:44 PM Subject: [nant-dev] NUnit2Task Default Formatter Hi, when working with NUnit2Task I saw that the output of the test always showed up twice when specifying a formatter. This is caused by always adding a defaultFormatter, even when there are formatters specified. Added: if (_formatterElements.Count == 0) The patch is copied below, also attached as NUnit2Task.patch Jasper. - Index: src/NAnt.NUnit/NUnit2/NUnit2Task.cs === RCS file: /cvsroot/nant/nant/src/NAnt.NUnit/NUnit2/NUnit2Task.cs,v retrieving revision 1.19 diff -u -r1.19 NUnit2Task.cs --- src/NAnt.NUnit/NUnit2/NUnit2Task.cs 25 May 2003 08:20:26 - 1.19 +++ src/NAnt.NUnit/NUnit2/NUnit2Task.cs 19 Aug 2003 15:30:11 - @@ -124,11 +124,13 @@ /// /summary /// param name=taskNodesee cref=XmlNode / containing the XML fragment used to initialize this task instance./param protected override void InitializeTask(XmlNode taskNode) { -FormatterElement defaultFormatter = new FormatterElement(); -defaultFormatter.Project = Project; -defaultFormatter.Type = FormatterType.Plain; -defaultFormatter.UseFile = false; -_formatterElements.Add(defaultFormatter); +if (_formatterElements.Count == 0) { +FormatterElement defaultFormatter = new FormatterElement(); +defaultFormatter.Project = Project; +defaultFormatter.Type = FormatterType.Plain; +defaultFormatter.UseFile = false; +_formatterElements.Add(defaultFormatter); +} } /// summary @@ -340,4 +342,4 @@ #endregion Private Instance Fields } } -} \ No newline at end of file +} --- 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
[nant-dev] suggestion - Solution task
Hi, I suggest to override OutputPath in .csproj in build-file. It could be useful to write some easy to maintain build files as that: target name=build solution configuration=Release output=${build.dir} projects includes name=**/*.csproj/ /projects /solution /target and need not to care what pathes are in .csprojs. Patch to this is attached [not sure about coding conventions] There are some minor bug-fixes related to path problems as well. Martin btw: maybe this could/should be done as general argument passing to csc? Enable to override any argument? Is that alCSCArguments parameter meant to be this? -- Created by Email.cz http://www.email.cz -- Get Your Free Email -- Created by Email.cz http://www.email.cz -- Get Your Free Email --- E:\src\nant\distrib\NAnt.VSNet\Tasks\SolutionTask.csFri Jul 25 10:07:28 2003 +++ E:\src\nant\src\NAnt.VSNet\Tasks\SolutionTask.csTue Aug 19 16:59:06 2003 @@ -20,6 +20,7 @@ using System.ComponentModel; using System.Collections; using System.Diagnostics; +using System.IO; using NAnt.Core; using NAnt.Core.Attributes; @@ -174,7 +175,13 @@ set { _strConfiguration = value; } } -string _strSolutionFile, _strConfiguration; +[TaskAttribute(output)] +public string OutputPath { + get { return _outPath;} +set { _outPath = Project.GetFullPath(value); } +} + +string _strSolutionFile, _strConfiguration, _outPath; FileSet _fsProjects, _fsReferenceProjects; } } --- E:\src\nant\distrib\NAnt.VSNet\ConfigurationSettings.cs Sun May 25 20:20:26 2003 +++ E:\src\nant\src\NAnt.VSNet\ConfigurationSettings.cs Tue Aug 19 16:53:56 2003 @@ -27,10 +27,15 @@ /// Summary description for ConfigurationSettings. /// /summary public class ConfigurationSettings { -public ConfigurationSettings( ProjectSettings ps, XmlElement elemConfig ) { -_alSettings = new ArrayList(); +public ConfigurationSettings( ProjectSettings ps, XmlElement elemConfig, string outputOverride) { +_alSettings = new ArrayList(); _strRelOutputPath = elemConfig.Attributes[ OutputPath ].Value; -_strOutputPath = new DirectoryInfo( ps.ProjectRootDirectory + @\ + elemConfig.Attributes[ OutputPath ].Value ).FullName; + + if(outputOverride==null || outputOverride==) + _strOutputPath = Path.Combine(ps.ProjectRootDirectory,elemConfig.Attributes[ OutputPath ].Value); + else + _strOutputPath = Path.Combine(ps.ProjectRootDirectory,outputOverride); + _strOutputPath =new DirectoryInfo(_strOutputPath).FullName; _ps = ps; _strName = elemConfig.GetAttribute( Name ).ToLower(); @@ -38,7 +43,7 @@ _strDocFilename = null; if ( ( elemConfig.Attributes[ DocumentationFile ] != null ) ( elemConfig.Attributes[ DocumentationFile ].Value.Length 0 )) { -FileInfo fiDocumentation = new FileInfo( ps.ProjectRootDirectory + @/ + elemConfig.Attributes[ DocumentationFile ].Value ); +FileInfo fiDocumentation = new FileInfo( Path.Combine( ps.ProjectRootDirectory,elemConfig.Attributes[ DocumentationFile ].Value )); _strDocFilename = fiDocumentation.FullName; _alSettings.Add( @/doc: + _strDocFilename + @ ); @@ -78,7 +83,7 @@ } } -_alSettings.Add( String.Format( @/out:{0}{1}, OutputPath, ps.OutputFile ) ); +_alSettings.Add( String.Format( @/out:{0}, FullOutputFile ) ); } public Task[] GetRequiredTasks() { --- E:\src\nant\distrib\NAnt.VSNet\Project.cs Fri Jul 25 10:07:28 2003 +++ E:\src\nant\src\NAnt.VSNet\Project.cs Tue Aug 19 19:04:12 2003 @@ -120,8 +120,16 @@ XmlNodeList nlConfigurations, nlReferences, nlFiles, nlImports; nlConfigurations = doc.SelectNodes( //Config ); + + string outputOverride = null; + if(_nanttask is SolutionTask) + { + SolutionTask st = (SolutionTask)_nanttask; + outputOverride=st.OutputPath; + } + foreach ( XmlElement elemConfig in nlConfigurations ) { -ConfigurationSettings cs = new ConfigurationSettings( _ps, elemConfig ); +ConfigurationSettings cs = new ConfigurationSettings( _ps, elemConfig, outputOverride ); _htConfigurations[ elemConfig.Attributes[ Name ].Value.ToLower() ] = cs; } @@ -182,7 +190,7 @@ } public ConfigurationSettings GetConfigurationSettings( string strConfiguration ) { -
[nant-dev] Global project setting for force?
Maybe this is why (clipped comment from a distantly related thread below) I didn't see this if it's already documented, but it took me a bit of serendipity (just happening to remember wondering why in tarnation the force attribute for call/ was there to begin with from sleep-deprived reading many nights ago) to figure out how to get all my multiple calls to reused targets to execute properly... Is force=false by default really the behavior that a user would expect of build management widget?? (I didn't, obviously -- but I'm abnormal. I have a diagnosed refactoring condition. :) It'd be handy to have a global option to set force=true|false for the whole build manifest... especially when I start making heavier use of include/ for libraries of reusable targets. But maybe there's a simpler way to do what I'm doing, so I've attached the build file in question if anybody's got time to knoodle over it... (Kudos to whoever wrote the sql/ task - it rawkz! Replacing oodles of batch files and a homegrown wrapper for ISQL is muy kewl. The only little fly in the ointment is that - like copy - it doesn't seem to take a fileset property, either. *pout* But I can work around that with foreach for now.) -Original Message- From: Gert Driesen [mailto:[EMAIL PROTECTED] Sent: Friday, August 22, 2003 5:42 PM To: Yogesh Shetty; [EMAIL PROTECTED] Subject: Re: [nant-dev] NUnit Config No, it's not. It's an attribute of a build element/type, not a task. For now, only tasks (and their attributes) are documented. Gert Database.Reload.build Description: Database.Reload.build
[nant-dev] Problems with solution task when solution has multiple projects
Just started trying to use Nant yesterday, so forgive me if this is a known issue. I created a solution for the HelloWorld example with one C# project in it (HelloWorld-cs.csproj). Using the following build script, Nant 0.8.3-rc2 compiled it just file: --- ?xml version=1.0? project name=Hello World default=build target name=build solution solutionfile=HelloWorld.sln configuration=debug/ /target /project --- I then added a second project to the solution, the HelloWorld VB example (HelloWorld-vb.vbproj). Nant failed with the following: --- NAnt version 0.8.3 Copyright (C) 2001-2003 Gerry Shaw http://nant.sourceforge.net Buildfile: file:///C:/nant-0.8.3-rc2/examples/HelloWorld/default.build build: [solution] Starting solution build. Total time: 0 seconds. BUILD FAILED INTERNAL ERROR System.NullReferenceException: Object reference not set to an instance of an obj ect. at NAnt.VSNet.Tasks.Project.Load(Solution sln, String strFilename) at NAnt.VSNet.Tasks.Solution.LoadProjects() at NAnt.VSNet.Tasks.Solution..ctor(String strSolutionFilename, ArrayList alAd ditionalProjects, ArrayList alReferenceProjects, TempFileCollection tfc, Task na nttask) at NAnt.VSNet.Tasks.SolutionTask.ExecuteTask() at NAnt.Core.Task.Execute() at NAnt.Core.Target.Execute() at NAnt.Core.Project.Execute(String targetName) at NAnt.Core.Project.Execute() at NAnt.Core.Project.Run() Please send bug report to [EMAIL PROTECTED] --- Thinking it might be the vb project, I removed the C# project and tried to build the solution again. It failed again with the same error. I then attempted adding and removing the various projects to ensure that the error was reproduceable. Is it the case that currently the solution task can only deal with solutions in which there is one and only one c# project? I can't believe that, so if someone could point out what I'm doing wrong, I'd appreciate it. Below is the text of the solution file with both projects in it. I'm using Visual Studio 2003 (7.1.3088). Thanks. --Michael --- Microsoft Visual Studio Solution File, Format Version 8.00 Project({F184B08F-C81C-45F6-A57F-5ABD9991F28F}) = HelloWorld-vb, HelloWorld-vb.vbproj, {E6082716-4D7B-4CE7-B45F-1565DCF05B90} ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Project({FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}) = HelloWorld-cs, HelloWorld-cs.csproj, {051E250A-6FBD-4BFF-AE73-CA3823F3E3FE} ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug Release = Release EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {E6082716-4D7B-4CE7-B45F-1565DCF05B90}.Debug.ActiveCfg = Debug|.NET {E6082716-4D7B-4CE7-B45F-1565DCF05B90}.Debug.Build.0 = Debug|.NET {E6082716-4D7B-4CE7-B45F-1565DCF05B90}.Release.ActiveCfg = Release|.NET {E6082716-4D7B-4CE7-B45F-1565DCF05B90}.Release.Build.0 = Release|.NET {051E250A-6FBD-4BFF-AE73-CA3823F3E3FE}.Debug.ActiveCfg = Debug|.NET {051E250A-6FBD-4BFF-AE73-CA3823F3E3FE}.Debug.Build.0 = Debug|.NET {051E250A-6FBD-4BFF-AE73-CA3823F3E3FE}.Release.ActiveCfg = Release|.NET {051E250A-6FBD-4BFF-AE73-CA3823F3E3FE}.Release.Build.0 = Release|.NET EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal --- 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