We use NAnt extensively for our build system. Recently, I've written a couple PowerShell Cmdlets to perform a few database related things. At first, the intent of these Cmdlets was not to necessarily run within our build process. However, this has recently become a need and we would like to run a few of these Cmdlets from our NAnt based build process.
These Cmdlets are written in C# and we have a SnapIn for them (if that matters at all).
A few ideas:
- Use the exec task to call PowerShell? (not sure how this would work though)
- Write a custom NAnt task that references and uses the Cmdlet?
What might be a good way to do this?