home links tools blog about

AngryPets Blog

home

Setting Up NantContrib (or getting NantContrib to work)


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?


posted on Thursday, November 25, 2004 1:43 AM
 

Existing Comments:

# re: Setting Up NantContrib (or getting NantContrib to work) - Posted: 12/14/2004 5:37 PM - By: LarryO
   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


# still not working - Posted: 1/10/2005 11:02 AM - By: Matt
   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.


# re: Setting Up NantContrib (or getting NantContrib to work) - Posted: 1/10/2005 11:10 AM - By: Michael K. Campbell
   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?).




# Seems it is a problem with 1.0 missing - Posted: 2/16/2005 11:08 AM - By: Stephan Wissel
   @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


# Rebuild the whole lot on 1.1 (need to fix the nmake) - Posted: 2/16/2005 12:03 PM - By: Stephan Wissel
   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


# re: Setting Up NantContrib (or getting NantContrib to work) - Posted: 2/16/2005 12:08 PM - By: Michael K. Campbell
   Awesome! Thanks Stephan -- you rule!
(Who would have thought that getting NantContrib to work would have been such a pain?)


# re: Setting Up NantContrib (or getting NantContrib to work) - Posted: 4/27/2005 1:37 AM - By: si
   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.


# re: Setting Up NantContrib (or getting NantContrib to work) - Posted: 5/12/2005 6:35 AM - By: Dave Amphlett
   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.



Add your own comment:


Go to http://blog.angrypets.com where comments are enabled.