What does everyone think of adding native NAnt pre- and post-build events to the <solution> task. These tasks would be independent of the existing project pre- and post-build events.

Ideally, we would make the current pre- and post-build expansion macro variables available via properties:

My suggestion is this, although we might need to add additional elements or properties to support triggers on successful/failed builds:

<solution configuration="release">
    <projects>
        <include name="A\A.csproj" />
        <include name="B\b.vbproj" />
        <include name="C\c.csproj" />
    </projects>
    <referenceprojects>
        <include name="X\x.csproj" />
    </referenceprojects>
    <beforeprojectbuild>
        <echo>About to build project ${projectpath}</echo>
    </beforeprojectbuild>
    <afterprojectbuild>
        <echo>Built project ${projectpath}!</echo>
    </afterprojectbuild>
</solution>

Or we could use a custom function available in the solution task to retrieve a macro:

<solution configuration="release">
    <projects>
        <include name="A\A.csproj" />
        <include name="B\b.vbproj" />
        <include name="C\c.csproj" />
    </projects>
    <referenceprojects>
        <include name="X\x.csproj" />
    </referenceprojects>
    <beforeprojectbuild>
        <echo>About to build project ${solution::expand('ProjectPath')}</echo>
    </beforeprojectbuild>
    <afterprojectbuild>
        <echo>Built project ${solution::expand('ProjectPath')}!</echo>
    </afterprojectbuild>
</solution>

Thoughts?

Matt.


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to