[nant-dev] Service controller patch for verbosity

2004-05-18 Thread Kevin Miller
The following is a patch that adds some verbose logging for the service
controller task. 

Also changed how a build exception is rethrown as I believe a plain
throw is usually preferred. 

Enjoy,

Kevin Miller

Index: src/NAnt.MSNet/Tasks/ServiceControllerTask.cs
===
RCS file:
/cvsroot/nant/nant/src/NAnt.MSNet/Tasks/ServiceControllerTask.cs,v
retrieving revision 1.1
diff -u -r1.1 ServiceControllerTask.cs
--- src/NAnt.MSNet/Tasks/ServiceControllerTask.cs   11 Feb 2004
19:19:27 -  1.1
+++ src/NAnt.MSNet/Tasks/ServiceControllerTask.cs   18 May 2004
21:53:28 -
@@ -212,15 +212,22 @@
 private void StartService(ServiceController serviceController)
{
 try {
 if (serviceController.Status ==
ServiceControllerStatus.Paused) {
-serviceController.Continue();
-} else {
+   serviceController.Continue();
+   Log(Level.Verbose, LogPrefix +
{0} was paused. Starting..., this.ServiceName);
+} 
+   else 
+   {
 serviceController.Start();
+   Log(Level.Verbose, LogPrefix +
Starting {0}..., this.ServiceName);
 }
 
 // wait until service is running or timeout expired
 
serviceController.WaitForStatus(ServiceControllerStatus.Running, 
 TimeSpan.FromMilliseconds(Timeout));
-} catch (Exception ex) {
+   Log(Level.Verbose, LogPrefix + {0}
started., this.ServiceName);
+} 
+   catch (Exception ex) 
+   {
 throw new
BuildException(string.Format(CultureInfo.InvariantCulture, 
 Cannot start service {0} on computer '{1}'.,
ServiceName,
 MachineName), Location, ex);
@@ -236,7 +243,10 @@
 try {
 if (serviceController.CanStop) {
 serviceController.Stop();
-} else {
+   Log(Level.Verbose, LogPrefix +
Stopping {0}..., this.ServiceName);
+} 
+   else 
+   {
 throw new
BuildException(string.Format(CultureInfo.InvariantCulture, 
 Cannot stop service {0} on computer '{1}'.,
ServiceName, 
 MachineName), Location);
@@ -245,9 +255,12 @@
 // wait until service is stopped or timeout expired
 
serviceController.WaitForStatus(ServiceControllerStatus.Stopped, 
 TimeSpan.FromMilliseconds(Timeout));
-} catch (BuildException ex) {
+   Log(Level.Verbose, LogPrefix + {0}
stopped., this.ServiceName);
+} 
+   catch (BuildException) 
+   {
 // rethrow exception
-throw ex;
+throw;
 } catch (Exception ex) {
 throw new
BuildException(string.Format(CultureInfo.InvariantCulture, 
 Cannot stop service {0} on computer '{1}'.,
ServiceName, 
@@ -285,6 +298,7 @@
  not currently started., ServiceName,
MachineName), 
 Location);
 } else {
+
Log(Level.Verbose, LogPrefix + Pausing {0}..., this.ServiceName);

 serviceController.Pause();
 }
 } else {
@@ -303,9 +317,12 @@
 // wait until service is paused or timeout expired
 
serviceController.WaitForStatus(ServiceControllerStatus.Paused, 
 TimeSpan.FromMilliseconds(Timeout));
-} catch (BuildException ex) {
+   Log(Level.Verbose, LogPrefix + {0} is
paused., this.ServiceName);
+} 
+   catch (BuildException) 
+   {
 // rethrow exception
-throw ex;
+throw;
 } catch (Exception ex) {
 throw new
BuildException(string.Format(CultureInfo.InvariantCulture, 
 Cannot pause service {0} on computer '{1}'.,
ServiceName,
@@ -323,6 +340,7 @@
 if (serviceController.Status ==
ServiceControllerStatus.Paused) {
 if (serviceController.CanPauseAndContinue) {
 if (serviceController.Status ==
ServiceControllerStatus.Paused) {
+
Log(Level.Verbose, LogPrefix + Continuing {0}..., this.ServiceName);

 serviceController.Continue();
 } else

RE: [nant-dev] Trying to write NAnt task, can't find a how-to

2004-03-13 Thread Kevin Miller



http://nant.sourceforge.net/wiki/index.php/WritingATask


From: 
[EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of 
[EMAIL PROTECTED]Sent: Thursday, March 11, 2004 11:16 AMTo: 
[EMAIL PROTECTED]Subject: [nant-dev] Trying to 
write NAnt task, can't find a "how-to"
Hi,I'm currently trying to write a relatively simple 
NAnt task in C#, but it doesn't get recognized by NAnt. I've dropped my 
resulting DLL and XML file into NAnt 0.8.4's bin directory. When I execute a 
build file that calls my task, I get a "System.ArgumentException: xml node has 
not been mapped" error.Is there a manual somewhere online that 
explains how to develop and use custom NAnt tasks?Many thanks in 
advance,Roy Dictus


RE: [nant-dev] AsmInfo patch

2004-02-29 Thread Kevin Miller
Title: RE: [nant-dev] AsmInfo patch






Ah interesting. I am sure your CodeDOM-fu is better than mine.

I am not sure how negative the extra generation of the assemblyinfo file when switching runtimes is. I am guessing if you are building multiple runtime versions of your application you still need to compile all the assemblies in the build for each runtime. Thus the only negative I see in that scenario is the extra time it takes to write the MemoryStream out to disk.

-Original Message-
From: Gert Driesen [mailto:[EMAIL PROTECTED]]
Sent: Sat 2/28/2004 9:23 AM
To: Kevin Miller; [EMAIL PROTECTED]
Subject: Re: [nant-dev] AsmInfo patch

The problem is that the C# code provider automatically inserts the comment
block I mentioned into the generated file. Meaning the asm task will
generate different files when run on .NET 1.0 and .NET 1.1, as the runtime
version that's output in that comment block will be different.

If there's any way of preventing that comment block from being generated,
please let me know ...

We can still use your hash implementation, but in that case the asm will
regenerate the AssemblyInfo file when switching runtimes (as the hash will
be different because of the fact that the comment block that's automatically
generated by the code provider will be different) ...

Gert

- Original Message -
From: Kevin Miller [EMAIL PROTECTED]
To: Gert Driesen [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Saturday, February 28, 2004 3:58 PM
Subject: RE: [nant-dev] AsmInfo patch


Funny, oh well it was fun getting my hands dirty with NAnt stuff again.

I say use my implementation :) Hmm, Not sure what which would be better.

I don't understand the importance of the 1.0 vs 1.1 comment differences when
the file generated will not have any comments. Unless I missed out on a
feature of asminfo that allows those comments to be retained.

I say if the comment feature is not explicitly necessary and the performance
of hashing is better than line by line compare which is anyones guess (my
gut tells my the line by line may be better) that we use the hash based
method.

Honestly I do not care too much either way as long as the feature makes it
into NAnt :)

Kevin

-Original Message-
From: Gert Driesen [mailto:[EMAIL PROTECTED]]
Sent: Sat 2/28/2004 2:01 AM
To: Kevin Miller; [EMAIL PROTECTED]
Subject: Re: [nant-dev] AsmInfo patch

Hi Kevin,

I just added support for this to the asminfo task in cvs yesterday :(

I actually compared each line of both files and skipped all comments ... I
did this as files generated with .NET 1.0 or .NET 1.1 only differ in the
comment block that is insert into the generated file :

//--

// autogenerated
// This code was generated by a tool.
// Runtime Version: 1.1.4322.940
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// /autogenerated
//--


However, I do like your approach a lot better. So, I'm not sure if I should
keep the current (quick and dirty) implementation or use yours ...

What do you think ?

Gert

- Original Message -
From: Kevin Miller [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 27, 2004 9:24 PM
Subject: [nant-dev] AsmInfo patch


I found the asminfo task today and fell in love. It solved a few
problems I was having with signing assemblies and paths to the key file.
I was frustrated by the fact that it always generates the
AssemblyInfo.cs file even if there are no changes. This causes the
csc/vbc task to build the project even if only the AssemblyInfo class
has been updated. This is clearly an annoyance during development
builds.

Attached is an updated that compares the present AssemblyInfo.x to
the one being generated. If they are different it writes the new code
one out to disk.

This file is updating the .84 release. Sorry I did not compare to the
latest cvs. Also, I did not add a switch to make this behavior optional.
This post is just to feel out well this enhancement would be received. I
am willing to create a decent patch. Let me know if there is interest in
this feature.

Kevin Miller














RE: [nant-dev] FAQ: The next NAnt version

2002-11-20 Thread Kevin Miller
Everytime this thread is brought up I always have to chime in and say here
here. 

So as expected I totally agree. I have 0.7.9.0+ version of NAnt + misc
NAntContrib tasks that I support so that we can actually use NAnt in some
stable fashion. I would rather base my support on a more current version. 

Now I get to sit back relax and wait another month before replying to the
same thread again. 

hits snooze... 
Kevin Miller

-Original Message-
From: Bernard Vander Beken [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 20, 2002 2:39 PM
To: [EMAIL PROTECTED]
Subject: [nant-dev] FAQ: The next NAnt version


Hello,

Every few months since the latest release, someone asked when the latest 
NAnt version was going to be replaced. This was no coincidence.

Problems:
- The latest non-CVS NAnt version (0.7.9.0) dates from June 11.
- Too often, problems are reported that were fixed a long time ago or 
are related to NAnt/NAntContrib confusion.
- Many support seeking NAnt users need to be directed to the CVS version 
of the day, which is the 'recommended' version.
- NAnt dependencies, from NAntContrib to build servers, should have a 
NAnt version to be compatible with.

In short, bringing out a new release (0.8.0) is needed.
Note: A combined NAnt + NAntContrib package Would Be Nice as well, but 
first things first.

I suggest a no-new-features-are-needed approach for this version.
The question is: What really *needs* to be done before the new version 
can be released?

I am aware of the NUnit to NUnit 2 migration, and have been able to use 
the latest NAnt and NUnit 2 using the exec task/console runner workaround.

Ready.
Steady.
Shoot your comments,

Bernard




---
This sf.net email is sponsored by: 
Battle your brains against the best in the Thawte Crypto 
Challenge. Be the first to crack the code - register now: 
http://www.gothawte.com/rd521.html
___
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


---
This sf.net email is sponsored by: 
Battle your brains against the best in the Thawte Crypto 
Challenge. Be the first to crack the code - register now: 
http://www.gothawte.com/rd521.html
___
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers



RE: [nant-dev] FAQ: The next NAnt version

2002-11-20 Thread Kevin Miller
Yep this is the way it works. We start the thread and someone goes off topic
and the powers that be never make up their mind. 

OpenSource creedo - Release early and release often. 

Kevin Miller

-Original Message-
From: Matthew Mastracci [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 20, 2002 2:56 PM
Cc: [EMAIL PROTECTED]
Subject: Re: [nant-dev] FAQ: The next NAnt version


While everyone's awake in here - can I ask which branch tag the next 
version of NAnt is coming from?  I'm sitting on the resx and license 
tasks for the moment.  As well, I'm still trying to get CVS under 
windows to work over PLink to sourceforge so I can actually check in.  :)

Kevin Miller wrote:

Everytime this thread is brought up I always have to chime in and say here
here. 

So as expected I totally agree. I have 0.7.9.0+ version of NAnt + misc
NAntContrib tasks that I support so that we can actually use NAnt in some
stable fashion. I would rather base my support on a more current version. 

Now I get to sit back relax and wait another month before replying to the
same thread again. 

hits snooze... 
Kevin Miller


---
This sf.net email is sponsored by: 
Battle your brains against the best in the Thawte Crypto 
Challenge. Be the first to crack the code - register now: 
http://www.gothawte.com/rd521.html
___
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers



RE: [nant-dev] Re: [Nant-users] Whatever happened w/ 0.8?

2002-09-18 Thread Kevin Miller

Please may the power that be give out a roadmap for NAnt?

It seems to me that the 0.8.0 release has been forgotten in lieu of the
refactored 0.9.0 release. 

I have frozen my NAnt local support for a pre 0.8.0 version as the refactor
broke the infrastructure I use to support NAnt, NAntContrib and custom
tasks. As things are working for me as it stands right now I am a happy NAnt
user. However I would like to pin my NAnt usage off a release rather than a
development version.

Kevin Miller

-Original Message-
From: Ben Lowery [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 06, 2002 9:06 PM
To: [EMAIL PROTECTED]
Subject: [nant-dev] Re: [Nant-users] Whatever happened w/ 0.8?


any progress on this one?

i think the big refactoring that just happened was in support of 0.9.0, but
what ever happened to 0.8.0?

also, are the items on the TODO page current?  are those what's needed to
get to the different milestones?  i would love to see nant get to 1.0 so
more people would feel comfortable using it as a keystone in their
development process.

--b


- Original Message -
From: Mark Griffiths [EMAIL PROTECTED]
To: NAnt Users [EMAIL PROTECTED]
Sent: Wednesday, August 14, 2002 2:58 PM
Subject: RE: [Nant-users] Whatever happened w/ 0.8?


 I was wondering the same thing.  From what I remember, Scott put up a
 release candidate zip file to
http://nant.sourceforge.net/nant-src-0.8.zip.
 I am keen to see 0.8 released, esp. since 0.7.9 contains a bug that
prevents
 it from working with our continuous integration service.  Can anyone
report
 on the status of 0.8?

 Thanks
 Mark

  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]On Behalf Of Brad Wilson
  Sent: 12 August 2002 01:59
  To: NAnt Users
  Subject: [Nant-users] Whatever happened w/ 0.8?
 
 
  Looking on the stable builds page, the last stable build is 0.7.9.0. I
  thought we had done a 0.8 at some point?
 
  Brad
 
  --
  Read my web log at http://www.quality.nu/dotnetguy/
 
 
 
  ---
  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
 



 ---
 This sf.net email is sponsored by: Dice - The leading online job board
 for high-tech professionals. Search and apply for tech jobs today!
 http://seeker.dice.com/seeker.epl?rel_code=31
 ___
 Nant-users mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/nant-users




---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


---
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source  Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab
___
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers



RE: [nant-dev] building the helloWorld sample

2002-09-10 Thread Kevin Miller

I was seeing this error yesterday when the vbc task was executing from c:\
If I changed paths to any sub directory it went away. Or if I set project
basedir=some dir ... it also went away.

It has been on my list of things to do to track down this bug. 

Kevin Miller

-Original Message-
From: Mahmoud Lamriben [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 09, 2002 9:34 PM
To: [EMAIL PROTECTED]
Subject: [nant-dev] building the helloWorld sample


Hi,
I got this error while trying to execute the
default.build file in the HelloWorld sample. Please
see details:
D:\Download\Dot Net\NANT\examples\HelloWorldnant
-buildfile:default.build
INTERNAL ERROR
System.UriFormatException: Invalid URI: The format of
the URI could not be determined.
   at System.Uri.Parse()
   at System.Uri..ctor(String uriString, Boolean
dontEscape)
   at System.Uri..ctor(String uriString)
   at SourceForge.NAnt.Project..ctor(String source)
   at SourceForge.NAnt.NAnt.Main(String[] args)

Please send bug report to
[EMAIL PROTECTED]

D:\Download\Dot Net\NANT\examples\HelloWorld

__
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers



[nant-dev] ziptask bug?

2002-08-17 Thread Kevin Miller

2 things: 

First, I cannot seem to get the ziplevel effect the storage method of the
zip file created. I set the zip file to ziplevel=0 and verified that the
property is indeed set as 0 via debugger. 

The zip file generated is still compressed. About 5 to 1, nice bit of
compression, but I was interested in sacrificing speed for space. 

Second, when I use a ziplevel 1,2,3 or 4. I sometimes get an array out of
bounds error generating a big zip file (800 or so entries resulting in a
4MB zip) does not seem to happen with small filesets. 

zip zipfile=${dist.dir}/${dist.name} ziplevel=1
fileset basedir=C:\Inetpub\wwwroot\
includes name=${project.dir}\**\*/
includes name=${project2.dir}\**\*/
includes name=${dbstuff.dir}\*/

!-- do not archive unnecessary files for deployment --
excludes name=**\*.vb/
excludes name=**\*.sln/
excludes name=**\*.suo/

excludes name=**\*.vbproj*/
excludes name=**\*.vssscc*/
excludes name=**\_vti_*\* /
  /fileset
/zip

  [zip] Zipping 880 files to \\remotemachine\share\foo.zip

INTERNAL ERROR
System.IndexOutOfRangeException: Index was outside the bounds of
the array.
   at SourceForge.NAnt.Task.Execute() in
c:\opensource\nant\src\NAnt\Task.cs:line 100
   at SourceForge.NAnt.Target.Execute() in
c:\opensource\nant\src\NAnt\Target.cs:line 149
   at SourceForge.NAnt.Target.Execute() in
c:\opensource\nant\src\NAnt\Target.cs:line 132
   at SourceForge.NAnt.Project.Execute(String targetName) in
c:\opensource\nant\src\NAnt\Project.cs:line 427
   at SourceForge.NAnt.Project.Execute() in
c:\opensource\nant\src\NAnt\Project.cs:line 412
   at SourceForge.NAnt.Project.Run() in
c:\opensource\nant\src\NAnt\Project.cs:line 448

Please send bug report to [EMAIL PROTECTED]

I have a sneaking suspicion this may be a problem with sharpziplib but
wanted to stop here first.


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers



[nant-dev] NAnt GUI

2002-08-02 Thread Kevin Miller

Is there any interest in an NAnt GUI to facilitate the launch of build
scripts? I am as good as the next guy at writing batch files but some people
work better with GUIs.

Possible Features:
  Associating the GUI with .build files in Explorer
  Allow loading build files from a file dialog. 
  On load of a build file the app would parse the xml looking for targets to
invoke. 
  Build logs could be displayed, scrollable, and savable. 
  A grid could be present that accepts name/value pairs for input parameters
to builds.
  Execution and property parameters could be saved to a standalone
buildfile.

This mail was inspired by a lot of push back from developers daunted by
command line programs. I am a bit shy of bandwidth just now so I just wanted
to post a what if to see if anyone else had input.

Kevin Miller


---
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] FileSet Newbie

2002-07-24 Thread Kevin Miller

I am working on a NAntContrib task for doing StarTeam source control
integration. I want to add a FileSet like capability to checkin/outs. The
primary difference is that it seems a FileSet is all about files local to
the system. Communications to the source server are expensive so the idea of
pre-scanning the repository for files to include or exclude is out of the
question. 

However I would like to utilize (and follow the spirit of) pattern matching
used by filesets. It seems the support for this is in DirectoryScanner.cs.
It is however tied to DirectoryInfo to resolve (cannonize) paths. This does
not work for me as those paths may not yet be local. 

Does anyone have an idea how this code could be refactored for use with
other pattern matching tasks or elements. 

Kevin Miller




---
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] IFTask PropertyMissing parameter?

2002-07-22 Thread Kevin Miller

Ah I see that NAnt does not allow it's properties to mutate at all. That
simplifies things nicely. You are forced to make your tasks atomic. 

That would pretty much prevent me from doing what I want to do unless I had
my tasks write information out to a temp file. 

I have to say I like the simplicity of the atomic operation. It is a
slippery slope down the scripting language path.

Kevin Miller

-Original Message-
From: Scott Hernandez [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 4:20 PM
To: 'Nant-Developers (E-mail)'
Subject: RE: [nant-dev] IFTask PropertyMissing parameter?


I was kinda leaning towards an if with a not. It is a little more
generic, and doesn't require us to add the negative condition to all the
tests.

 -Original Message-
 From: Kevin Miller
 Sent: Monday, July 22, 2002 2:16 PM
 To: Nant-Developers (E-mail)
 Subject: [nant-dev] IFTask PropertyMissing parameter?
 
 Does anyone have a problem with adding a property to the If task
allowing
 you to check to see if a property is missing? The reason I see the
need
 for
 this is to test for negations. For instance if I use Nant to invoke a
 child
 build with inherit all. The childscript may not wish to override
 properties
 passed in by the parent. It can then test if the property is missing
 
 if propertymissing=debug
   property name=debug value=true /
 /if
 
 I understand you may not want NAnt to become a scripting language so
if
 you
 have another suggestion to accomplish this please let me know.
 
 Kevin Miller



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



RE: [nant-dev] IFTask PropertyMissing parameter?

2002-07-22 Thread Kevin Miller

Ah, I see your point now. I do like that better as well.

Kevin Miller

-Original Message-
From: Scott Hernandez [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 4:41 PM
To: 'Nant-Developers (E-mail)'
Subject: RE: [nant-dev] IFTask PropertyMissing parameter?


I'm not sure why multiple logical checks are a problem.

Maybe the simplest solution is to create an ifnot which is really the
if task checking !condition(s).

Here is the code.

class IfNotTask : IfTask
{
protected override bool ConditionsTrue {
return !base.ConditionsTrue;
}
}

It would solve your problem by supplying the following syntax.

ifnot propertyexits=debug/


 -Original Message-
 From: [EMAIL PROTECTED]
[mailto:nant-developers-
 [EMAIL PROTECTED]] On Behalf Of Kevin Miller
 Sent: Monday, July 22, 2002 2:28 PM
 To: 'Scott Hernandez'; 'Nant-Developers (E-mail)'
 Subject: RE: [nant-dev] IFTask PropertyMissing parameter?
 
 I agree with you there but the way If is implemented it considers all
 parameters for the condition. You could limit the task to accept only
one
 logic parameter but then you are limiting its power.
 
 -Original Message-
 From: Scott Hernandez [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 22, 2002 4:20 PM
 To: 'Nant-Developers (E-mail)'
 Subject: RE: [nant-dev] IFTask PropertyMissing parameter?
 
 
 I was kinda leaning towards an if with a not. It is a little more
 generic, and doesn't require us to add the negative condition to all
the
 tests.
 
  -Original Message-
  From: Kevin Miller
  Sent: Monday, July 22, 2002 2:16 PM
  To: Nant-Developers (E-mail)
  Subject: [nant-dev] IFTask PropertyMissing parameter?
 
  Does anyone have a problem with adding a property to the If task
 allowing
  you to check to see if a property is missing? The reason I see the
 need
  for
  this is to test for negations. For instance if I use Nant to invoke
a
  child
  build with inherit all. The childscript may not wish to override
  properties
  passed in by the parent. It can then test if the property is missing
 
  if propertymissing=debug
  property name=debug value=true /
  /if
 
  I understand you may not want NAnt to become a scripting language so
 if
  you
  have another suggestion to accomplish this please let me know.
 
  Kevin Miller
 
 
 
 ---
 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



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



RE: [nant-dev] Problem with embeded resources

2002-07-18 Thread Kevin Miller

There is a resgen task in the NAntContrib project. I faked out and did
exec path.

echo message=Creating Error Messages Resource /
exec program=resgen.exe commandline=quot;${src.dir}\ErrorMsgs.txtquot;
${build.dir}\ErrorMsgs.resources /

$quot : are important if there are spaces in your paths.

Word is there will be a release soon with a nice installer for both NAnt and
NAntContrib. 

Kevin Miller


-Original Message-
From: Browning, Don [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 3:53 PM
To: 'Ian MacLean'; Browning, Don
Cc: [EMAIL PROTECTED]
Subject: RE: [nant-dev] Problem with embeded resources


Wow, 
That's my problem, I didn't realize you couldn't embed the resx files, but I
see that they are only a design time thing and they must be compiled down
themselves.
Now my only other question is this: I can't seem to find a resgen task.  Do
I need to shell it out to the resgen.exe?  
Thanks, 
Don 


-Original Message- 
From: Ian MacLean [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, July 18, 2002 4:00 PM 
To: Browning, Don 
Cc: [EMAIL PROTECTED] 
Subject: Re: [nant-dev] Problem with embeded resources 


Don, 
What does your vbc task look like ? Are you adding the resources 
properly using the arg element ? - see below an example of how to do 
this. You can examine what resources have been added to an assembly 
using ildsam - open the double-click on the MANIFEST  node. 
1) resgen the resx file to create a .resources file 
resgen input=PageControl.resx 
output=${directory}\Orion.GUI.ControlLibrary.PageControl.resources / 
2) and then add somthing like this to your vbc task 
arg 
value=/resource:${directory}\Orion.GUI.ControlLibrary.PageControl.resources
 
/ 
Ian 
 Currently, my build script works fine, it runs start to finish 
 compiling my app (1 exe, 18 dll's), but once I run the main 
 executable, the get the following error: 
 
 An unhandled exception of type 
 'System.Resources.MissingManifestResourceException' occurred in 
 mscorlib.dll 
 
 Additional information: Could not find any resources appropriate for 
 the specified culture (or the neutral culture) in the given assembly.  
 Make sure PageControl.resources was correctly embedded or linked 
 into assembly Orion.GUI.ControlLibrary. 
 
 baseName: PageControl  locationInfo: 
 Turner.BSD.Orion.GUI.ControlLibrary.PageControl  resource file name: 
 PageControl.resources  assembly: Orion.GUI.ControlLibrary, 
 Version=0.9.2299.37, Culture=neutral, PublicKeyToken=null 
 
 It appears the resources are not being embedded properly, but I've 
 taken a look at the vbc task and everything appears to be ok.  Has 
 anyone else encountered this problem? 
 
 If it helps, I can send the build script. 
 
 Thanks, 
 
 Don 
 


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