[NAnt-users] Input prompting ...

2009-11-03 Thread Parrish, Ken
Nant Users,

Is there a task that can be used to prompt a user for input of a property?  I'd 
like to design some tasks which will prompt the user for input of a property if 
the property was not specified on the command line.  I looked in both Nant and 
NantContrib and didn't see anything.  Am I missing something?

Ken Parrish
Gomez, Inc.
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] Input prompting ...

2009-11-03 Thread Bob Archer
The only thing I could think would be to exec a bat file that prompts for a 
value and writes it to a text file or something. I pretty much think nant is 
designed for non-attended use.

BOb


From: Parrish, Ken [mailto:kparr...@gomez.com]
Sent: Tuesday, November 03, 2009 9:34 AM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Input prompting ...

Nant Users,

Is there a task that can be used to prompt a user for input of a property?  I'd 
like to design some tasks which will prompt the user for input of a property if 
the property was not specified on the command line.  I looked in both Nant and 
NantContrib and didn't see anything.  Am I missing something?

Ken Parrish
Gomez, Inc.
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] Input prompting ...

2009-11-03 Thread Torben Rohde
I once did the bat-file-method as Bob suggests, but I also wrapped it in a
VB script (not the ultimate best-practice but it worked :-)

Here's my code for inspiration if you decide to take that route:

.vbs file:

   dim newline : newline = Chr(13) & Chr(10)

   dim strApplicationMetaname
   strApplicationMetaname = ""


   '--- Main program run ---

  strApplicationMetaname = GetApplicationMetanameFromUser

  If strApplicationMetaname = "" Or IsNull(strApplicationMetaname) Then
MsgBox "No application name specified - aborting build " +
   strApplicationMetaname, vbOKOnly + vbExclamation, "No application name
   specified"
  Else
Call CallBuild(strApplicationMetaname)
  End If


   '--- Misc ---

  Function GetApplicationMetanameFromUser()

dim userInput
userInput = InputBox("Enter the name of the application
   instance you wish to build (e.g. MyCompany)" + newline + "(this will
   determine names of services etc. - e.g. if you enter MyCompany, the
   merger will be named MergerMyCompany)", "Enter application metaname")
GetApplicationMetanameFromUser = userInput

  End Function


  Function CallBuild(strApplicationMetanameParm)

dim objWSHShell
Set objWSHShell = WScript.CreateObject("WScript.Shell")
objWSHShell.CurrentDirectory = ".\merger\"
Call objWSHShell.Run("build_and_deploy.bat " +
   strApplicationMetanameParm + " v1_2_3", 1, true)

  End Function

.bat file called by VB script:

   @ECHO OFF
   IF "%1" == "" GOTO NoNameSpecified
   IF "%2" == "" GOTO NoVersionSpecified

   nant /f:builds/merger_build_and_deploy.nant.build -D:MergerName=%1
   -D:MergerVersion=%2

   GOTO EndProgram


   :NoNameSpecified
   ECHO ---
   ECHO This bat file can not be run directly. (name not set)
   ECHO Use the corresponding VBScript "merger_build_and_deploy.vbs"
   instead
   ECHO ---
   GOTO EndProgram

   :NoVersionSpecified
   ECHO ---
   ECHO This bat file can not be run directly. (version not set)
   ECHO Use the corresponding VBScript "merger_build_and_deploy.vbs"
   instead
   ECHO ---
   GOTO EndProgram

   :NoNameSpecified


   :EndProgram
   pause

Torben Rohde
Subsero A/S



   
 Bob Archer
   Til 
   "Parrish, Ken"  
 03-11-2009 15:49  ,   
   "nant-users@lists.sourceforge.net"  
 
cc 
   
  Emne 
   Re: [NAnt-users] Input prompting
   ... 
   
   
   
   
   
   




The only thing I could think would be to exec a bat file that prompts for a
value and writes it to a text file or something. I pretty much think nant
is designed for non-attended use.

BOb


From: Parrish, Ken [mailto:kparr...@gomez.com]
Sent: Tuesday, November 03, 2009 9:34 AM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Input prompting ...

Nant Users,

Is there a task that can be used to prompt a user for input of a property?
I’d like to design some tasks which will prompt the user for input of a
property if the property was not specified on the command line.  I looked
in both Nant and NantContrib and didn’t see anything.  Am I missing
something?

Ken Parrish
Gomez, Inc.
--

Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users
--
Come build with us! The BlackBerry(R) Developer 

Re: [NAnt-users] Input prompting ...

2009-11-03 Thread Michael Pento
Good Afternoon Folks,

 

I was just playing around with this and I was able to do it with a C#
script function in a target:

 

















 

Executing this on my machine produces the following output:

 

C:\>nant -f:test.build getUserInput

NAnt 0.86 (Build 0.86.2898.0; beta1; 12/8/2007)

Copyright (C) 2001-2007 Gerry Shaw

http://nant.sourceforge.net

 

Buildfile: file:///C:/test.build

Target framework: Microsoft .NET Framework 3.5

Target(s) specified: getUserInput

 

[loadtasks] Scanning assembly "NAnt.Contrib.Tasks" for extensions.

[loadtasks] Scanning assembly "broloco.NAntTasks" for extensions.

   [script] Scanning assembly "cb5myvqk" for extensions.

 

getUserInput:

 

   [script] Scanning assembly "vohtvvkh" for extensions.

Enter a string:

This is a test string!!

 [echo] > Input String: This is a test string!!

 

BUILD SUCCEEDED

 

Total time: 8.4 seconds.

 

This stores the input into a property and you can do whatever you like
with it after that.

 

I hope this helps,

Mike

 



From: Parrish, Ken [mailto:kparr...@gomez.com] 
Sent: Tuesday, November 03, 2009 9:34 AM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Input prompting ...

 

Nant Users,

 

Is there a task that can be used to prompt a user for input of a
property?  I'd like to design some tasks which will prompt the user for
input of a property if the property was not specified on the command
line.  I looked in both Nant and NantContrib and didn't see anything.
Am I missing something?

 

Ken Parrish

Gomez, Inc.

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] nANT and nUnit2 integration and running test.

2009-11-03 Thread Steven Whatmore
Good afternoon,

I am trying to integrate my unit testing into a nightly build process and am 
having one hell of a time getting the test to run successfully.

My unit test run fine from Visual Studio and using the test runner GUI but am 
receiving the following error when I run it from nANT.

Failure executing test(s). If you assembly is not built using NUnit version 
2.2.8.0, then ensure you have redirected assembly bindings.
Consult the documentation of the  task for more information.:
NAnt.Core.BuildException: C:\Projects\PureFees-Net\PureFees-Net
\PureFees-Net-nUnit.build(14,10):
Failure executing test(s). If you assembly is not built using NUnit version 
2.2.8.0, then ensure you have redirected assembly bindings.
Consult the documentation of the  task for more information.
---> System.IO.FileNotFoundException: Could not load file or assembly
'PureFees-Net-TestSuite' or one of its dependencies. The system cannot find the 
file specified.
File name: 'PureFees-Net-TestSuite'
  at (wrapper xdomain-invoke) NUnit.Core.ProxyTestRunner:Load (string)
  at NAnt.NUnit2.Tasks.NUnit2Task.ExecuteTask () [0x0]
  --- End of inner exception stack trace ---
  at NAnt.NUnit2.Tasks.NUnit2Task.ExecuteTask () [0x0]
  at NAnt.Core.Task.Execute () [0x0]

The documentation on how to properly configure this is not 100% clear.

The same test runs successfully on the build machine by directly loading the 
project into the GUI but the nANT nUnit2 task does not.

I have tried many variations of the configuration of the test and the nUnit 
task but with no luck.

I must be missing something obvious (or not so obvious in this case)

Here is my nANT file


http://nant.sf.net/schemas/nant.xsd";>




















And here is my Test-Net-QC.nunit






 
 
 





Thanks in advance.

Whatty


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] nANT and nUnit2 integration and running test.

2009-11-03 Thread Bob Archer
The version nant references is different than the version that you are using in 
your own app. Use the exec task instead of the nunit2 task.

http://www.hanselman.com/blog/CallingNUnitFromNAntPragmatically.aspx

BOb


> -Original Message-
> From: Steven Whatmore [mailto:steven.whatm...@purefacts.com]
> Sent: Tuesday, November 03, 2009 1:06 PM
> To: nant-users@lists.sourceforge.net
> Subject: [NAnt-users] nANT and nUnit2 integration and running test.
> 
> Good afternoon,
> 
> I am trying to integrate my unit testing into a nightly build
> process and am having one hell of a time getting the test to run
> successfully.
> 
> My unit test run fine from Visual Studio and using the test runner
> GUI but am receiving the following error when I run it from nANT.
> 
> Failure executing test(s). If you assembly is not built using NUnit
> version 2.2.8.0, then ensure you have redirected assembly bindings.
> Consult the documentation of the  task for more
> information.:
> NAnt.Core.BuildException: C:\Projects\PureFees-Net\PureFees-Net
> \PureFees-Net-nUnit.build(14,10):
> Failure executing test(s). If you assembly is not built using NUnit
> version 2.2.8.0, then ensure you have redirected assembly bindings.
> Consult the documentation of the  task for more
> information.
> ---> System.IO.FileNotFoundException: Could not load file or
> assembly
> 'PureFees-Net-TestSuite' or one of its dependencies. The system
> cannot find the file specified.
> File name: 'PureFees-Net-TestSuite'
>   at (wrapper xdomain-invoke) NUnit.Core.ProxyTestRunner:Load
> (string)
>   at NAnt.NUnit2.Tasks.NUnit2Task.ExecuteTask () [0x0]
>   --- End of inner exception stack trace ---
>   at NAnt.NUnit2.Tasks.NUnit2Task.ExecuteTask () [0x0]
>   at NAnt.Core.Task.Execute () [0x0]
> 
> The documentation on how to properly configure this is not 100%
> clear.
> 
> The same test runs successfully on the build machine by directly
> loading the project into the GUI but the nANT nUnit2 task does not.
> 
> I have tried many variations of the configuration of the test and
> the nUnit task but with no luck.
> 
> I must be missing something obvious (or not so obvious in this
> case)
> 
> Here is my nANT file
> 
> 
>  xmlns="http://nant.sf.net/schemas/nant.xsd";>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  appconfig="Test-Net-QC.nunit" />
> 
> 
> 
> 
> 
> 
> And here is my Test-Net-QC.nunit
> 
> 
> 
> 
> 
> 
>  publicKeyToken="96d09a1eb7f44a77" culture="Neutral" />
>  newVersion="2.2.8.0" />
>  newVersion="2.2.8.0" />
> 
> 
> 
> 
> 
> Thanks in advance.
> 
> Whatty
> 
> 
> ---
> ---
> Come build with us! The BlackBerry(R) Developer Conference in SF,
> CA
> is the only developer event you need to attend this year. Jumpstart
> your
> developing skills, take BlackBerry mobile applications to market
> and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register
> now!
> http://p.sf.net/sfu/devconference
> ___
> NAnt-users mailing list
> NAnt-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nant-users

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] Input prompting ...

2009-11-03 Thread Parrish, Ken
Mike,

This looks like it will work just fine.  I have a custom Nant extensions 
project and will add this in that DLL.

Thanks,

Ken Parrish
Gomez, Inc.

From: Michael Pento [mailto:mpe...@metratech.com] 
Sent: Tuesday, November 03, 2009 12:52 PM
To: Parrish, Ken; nant-users@lists.sourceforge.net
Subject: RE: [NAnt-users] Input prompting ...

Good Afternoon Folks,

I was just playing around with this and I was able to do it with a C# script 
function in a target:


   
    
    
    
    
    


Executing this on my machine produces the following output:

C:\>nant -f:test.build getUserInput
NAnt 0.86 (Build 0.86.2898.0; beta1; 12/8/2007)
Copyright (C) 2001-2007 Gerry Shaw
http://nant.sourceforge.net

Buildfile: file:///C:/test.build
Target framework: Microsoft .NET Framework 3.5
Target(s) specified: getUserInput

[loadtasks] Scanning assembly "NAnt.Contrib.Tasks" for extensions.
[loadtasks] Scanning assembly "broloco.NAntTasks" for extensions.
   [script] Scanning assembly "cb5myvqk" for extensions.

getUserInput:

   [script] Scanning assembly "vohtvvkh" for extensions.
Enter a string:
This is a test string!!
 [echo] > Input String: This is a test string!!

BUILD SUCCEEDED

Total time: 8.4 seconds.

This stores the input into a property and you can do whatever you like with it 
after that.

I hope this helps,
Mike


From: Parrish, Ken [mailto:kparr...@gomez.com] 
Sent: Tuesday, November 03, 2009 9:34 AM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Input prompting ...

Nant Users,

Is there a task that can be used to prompt a user for input of a property?  I'd 
like to design some tasks which will prompt the user for input of a property if 
the property was not specified on the command line.  I looked in both Nant and 
NantContrib and didn't see anything.  Am I missing something?

Ken Parrish
Gomez, Inc.

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] nANT and nUnit2 integration and running test.

2009-11-03 Thread Steven Whatmore
Bob,

Thanks for the direction, took me about an hour to figure that out and now my 
test suite is included as part of my nightly builds.

Why did I waste almost a day and half trying to figure this out and should of 
just went to this immediately.

Also using "nunit2report" to format my output nicely (similar to my jUNIT test 
suites) and attaching to an HTML email that is sent out at the end of the 
process.

You the man!

Whatty

Steve Whatmore, MBA, MCP, .NET
Senior Architect
416.598.1241 x245
-
PureFacts Financial Solutions
372 Bay Street, Suite 1400
Toronto, Ontario M5H 2W9
416.598.1241 main
888.596.9338 toll free
416.598.9226 fax

www.purefacts.com


PureFacts Financial Solutions is a Lynxdev Company
Please consider the environment before printing this e-mail.
This e-mail may be privileged and/or confidential, and the sender does not 
waive any related rights and obligations. Any distribution, use or copying of 
this e-mail or the information it contains by other than an intended recipient 
is unauthorized. If you received this e-mail in error, please advise me (by 
return e-mail or otherwise) immediately.
Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce 
pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation 
ou copie de ce message ou des renseignements qu'il contient par une personne 
autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce 
courrier électronique par erreur, veuillez m'en aviser immédiatement, par 
retour de courrier électronique ou par un autre moyen.



-Original Message-
From: Bob Archer [mailto:bob.arc...@amsi.com] 
Sent: Tuesday, November 03, 2009 1:26 PM
To: Steven Whatmore; nant-users@lists.sourceforge.net
Subject: RE: nANT and nUnit2 integration and running test.

The version nant references is different than the version that you are using in 
your own app. Use the exec task instead of the nunit2 task.

http://www.hanselman.com/blog/CallingNUnitFromNAntPragmatically.aspx

BOb


> -Original Message-
> From: Steven Whatmore [mailto:steven.whatm...@purefacts.com]
> Sent: Tuesday, November 03, 2009 1:06 PM
> To: nant-users@lists.sourceforge.net
> Subject: [NAnt-users] nANT and nUnit2 integration and running test.
> 
> Good afternoon,
> 
> I am trying to integrate my unit testing into a nightly build
> process and am having one hell of a time getting the test to run
> successfully.
> 
> My unit test run fine from Visual Studio and using the test runner
> GUI but am receiving the following error when I run it from nANT.
> 
> Failure executing test(s). If you assembly is not built using NUnit
> version 2.2.8.0, then ensure you have redirected assembly bindings.
> Consult the documentation of the  task for more
> information.:
> NAnt.Core.BuildException: C:\Projects\PureFees-Net\PureFees-Net
> \PureFees-Net-nUnit.build(14,10):
> Failure executing test(s). If you assembly is not built using NUnit
> version 2.2.8.0, then ensure you have redirected assembly bindings.
> Consult the documentation of the  task for more
> information.
> ---> System.IO.FileNotFoundException: Could not load file or
> assembly
> 'PureFees-Net-TestSuite' or one of its dependencies. The system
> cannot find the file specified.
> File name: 'PureFees-Net-TestSuite'
>   at (wrapper xdomain-invoke) NUnit.Core.ProxyTestRunner:Load
> (string)
>   at NAnt.NUnit2.Tasks.NUnit2Task.ExecuteTask () [0x0]
>   --- End of inner exception stack trace ---
>   at NAnt.NUnit2.Tasks.NUnit2Task.ExecuteTask () [0x0]
>   at NAnt.Core.Task.Execute () [0x0]
> 
> The documentation on how to properly configure this is not 100%
> clear.
> 
> The same test runs successfully on the build machine by directly
> loading the project into the GUI but the nANT nUnit2 task does not.
> 
> I have tried many variations of the configuration of the test and
> the nUnit task but with no luck.
> 
> I must be missing something obvious (or not so obvious in this
> case)
> 
> Here is my nANT file
> 
> 
>  xmlns="http://nant.sf.net/schemas/nant.xsd";>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  appconfig="Test-Net-QC.nunit" />
> 
> 
> 
> 
> 
> 
> And here is my Test-Net-QC.nunit
> 
> 
> 
> 
> 
> 
>  publicKeyToken="96d09a1eb7f44a77" culture="Neutral" />
>  newVersion="2.2.8.0" />
>  newVersion="2.2.8.0" />
> 
> 
> 
> 
> 
> Thanks in advance.
> 
> Whatty
> 
> 
> ---
> ---
> Come build with us! The BlackBerry(R) Developer Conference in SF,
> CA
> is the only developer event you need to attend this year. Jumpstart
> your
> developing skills, take BlackBerry mobile applications to market
> and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register
> now!
> htt