I have tried my best to create a custom while loop but ended in vain. Has anyone been successful in creating a custom while loop in NANT.
Regards
Sarathy
I have tried my best to create a custom while loop but ended in vain. Has anyone been successful in creating a custom while loop in NANT.
Regards
Sarathy
Without additional information, there is a tutorial on creating a custom NAnt task here.
One nice thing about the article is the author suggests 2 means of debugging your custom task:
Copy the assembly (and pdb) file to the NAnt bin directory. Open your solution in Visual Studio that contains the source for your task. Place your breakpoints. Go to the project properties and open the Debugging page. Change the Debug Mode to Program and the Start Application to the path to the NAnt executable (e.g. C:\Program Files\NAnt\bin\NAnt.exe). Then set the working directory and/or command line arguments so that NAnt will pick up your build file. Click run and away you go.
Place System.Diagnostics.Debbugger.Break(); in your code before the line you want to break on. Re-compile the project and copy the assembly (and pdb) to the NAnt bin directory. When you run your NAnt script you should get a popup box asking you to choose a debugger.
There is another tutorial here.
Alternately, can you express your problem in terms of a foreach?
I have created the custom task by myself. But it seems there are some issues in using nested loops in NANT.
Basically I'm trying to use nested loop. A while loop inside a foreach or a foreach inside another foreach. But in both instances the loop executes the current target & the target from which the current target is called for every iteration instead of the body inside the second loop.
Regards
Sarathy