If you don't know what Nant is... go check it out, over at SourceForge.
Once you check it out, it shouldn't take long for you to discover NantContrib -- a bunch of extra Tasks that extend Nant. Only there's problem: what the hell do you do with NantContrib once you download it
My first thought was to check the readme.txt, that would tell me what to do right Well, hmmm... not really... it had a bunch of gobblety-gook about building NantContrib and downloading source via CVS from Nant, and then having to compile NantContrib against that. That sounded way to bothersome, so I checked the /docs/ folder thinking there'd be a simpler way of getting at the 'extra goodness.'
Only, no dice. Nada, zip, zilch, rien. Not one LICK of info about how to get to the extra goodness.
So, it was back to trying to build it. Only that's a complete exercise in absolute futility. From what I've seen on google, compiling it is an absolute pain-in-the-butt -- that doesn't seem to work very often.
But I really wanted the extra goodness.... so I tried to build for a while... and got cranky, and crabby, and down-right pissed.
Maybe I'm dumb or something, but you'd think somewhere somebody would mention (within the NantContrib download, or docs, or wiki, or whatnot) how to get to the extra goodness.
Feel like I'm taking forever getting to the point You don't know the HALF of my pain...
S O L U T I O N (i.e. how to get NantContrib Tasks to work with Nant):
Just copy everything in the NantContrib\bin directory into Nant\bin. That's it.
No compiling, no tweaking, no building, no nothing. Just copy the guts out of NantContrib into Nant, and you'll
be able to use tasks like slingshot,sql,vss,etc.
Maybe everyone else in the world saw that as the way to proceed. Somehow that just didn't seem like the answer to me. But hey... if I'd have just seen it mentioned somewhere... the docs the readme the wiki
I have to admit, it didn't freakin' seem obvious to me either. I found your page did what you said...and now it WORKS. What a minor detail. Thanks for your comment. Larry
Posted by: LarryO | December 14, 2004 at 05:37 PM
I found this page after a good deal of searching. I attempted your solution, but I still get an error in loadtasks: One or more of the types in the assembly unable to load. I am trying to use 0.85-rc1, so maybe that part isn't ready for primetime. Trouble is, I need NAnt 0.85-rc1. I suppose I could try mixing versions for grins just to prove that it doesn't work either.
Posted by: Matt | January 10, 2005 at 11:02 AM
Hmmm. Yeah, my hunch is that you're screwed and have to go through all the evil of compiling 8.51-rc1 into the bits yourself.... my 'solution' was around just how to get a 'normal'/full-released version to work. (problem is... getting the pig to build just never seemed to work for me.) I'm surprised it can't find the correct assemblies. I can't remember the exact rules for the .NET fusion assembly loader... but I would have thought that .851 would easily be seen as a compatable version with 8.5 (it's supposed to allow small 'upgrades' inside assemblies -- unless .851 somehow breaks existing interfaces?).
Posted by: Michael K. Campbell | January 10, 2005 at 11:10 AM
Worked for me: Rebuilt nant on 1.1 Framework, Rebuild contrib. Delete the CollectionGen.dll from the bin directory and then copy the stuff into nant\bin\tasks\net (you need to create \tasks\net manually). ;-) stw
Posted by: Stephan Wissel | February 16, 2005 at 12:03 AM
Awesome! Thanks Stephan -- you rule! (Who would have thought that getting NantContrib to work would have been such a pain?)
Posted by: Michael K. Campbell | February 16, 2005 at 12:08 AM
@Matt It looks like a problem with NANT rather than contrib. My guess from the mailing list is: if you don't have Framework 1.0 you need to build NANT from source and then contrib. I'll try that 2night. :-) stw
Posted by: Stephan Wissel | February 16, 2005 at 11:08 AM
Another way: 1. Install NAnt and NAntContrib into their own separate directories. 2. Store pathing to NAntContrib/bin dir into a property, say ${nantcontrib-bindir}. 3. Call loadtasks assembly=${nantcontrib-bindir}/NAnt.Contrib.Tasks.dll/ This approach has worked for me on NAnt-85rc1 to rc3 on .NET1.1 and Mono. Caveat: I've always used matching NAnt and NAntContrib versions.
Posted by: si | April 27, 2005 at 01:37 AM
or even more explicitly: property name=nantcontrib value=C:\Program Files\nantcontrib-0.85-rc3\bin overwrite=false / target name=get description=get the latest version from sourcesafe loadtasks assembly=${path::combine(nantcontrib, 'NAnt.Contrib.Tasks.dll')} / vssget localpath=. etc. etc.
Posted by: Dave Amphlett | May 12, 2005 at 06:35 AM
I'm also trying to get this working, no joy yet :(
Tried copying contents of the nantcontrib bin release into nant folder, and also tried the method above (tho i dont 100% know what i'm doing ...)
I'm using .Net 2.0 , will that make a difference?>>?
I just want slingshot to help me create a build file for a website solution.
Thanks
Posted by: Adz | July 06, 2006 at 05:13 AM
Man, you are a life saver! Thanks for sharing with us how to get the 'extra goodness'!
Posted by: Michael | April 25, 2008 at 03:26 PM
They should have maybe included an nant build task to copy the files to the right place.
Posted by: Anne | September 27, 2010 at 02:08 PM