Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use nant to build a custom nant task

Tags:

nant

I'm using nant to build our product and have written a custom task to notify our helpdesk system that a new build is available.

I've used nant to build the custom task and also to copy the custom nant task assembly into the nant folder so it's loaded automatically.

Worked fine the first time I ran the build.

The second time I ran the build the copy task failed because nant has loaded the custom task assembly and locked the file. Grrr.

How can I get this to work?

like image 982
robaker Avatar asked Jan 23 '26 21:01

robaker


1 Answers

You don't need to copy the assembly to the NAnt folder, just place the following at the top of your build script:

<loadtasks assembly="path\to\MyAssembly.dll" />
like image 127
Matt Howells Avatar answered Jan 26 '26 11:01

Matt Howells



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!