I understand I’m not what you call the sharpest bulb in the bunch, but readmes shouldn’t be painful. They should be helpful. They should be kind and gentle, and remind you that the world is great and wonderful. Not put you on the verge of a three figure body count. In a way, this is why I’ve shied away from a lot of open source stuff since the readme files read like instructions for putting together something from IKEA. And not the horrible broken English ones, more like the ones with all those funny squiggly lines. (I think it’s call “Chinese”) Why is it always so painful to figure something out WHEN YOU HAVE INSTRUCTIONS? Best hint on writing instructions, always assume the person you’re writing to is an idiot. You can infer from that whatever you want.
Anyhow, NantContrib, the library of things that adds on to Nant (With brilliant ideas like being able to add an else to an if WOW), is a victim of nothumanenoughtowriteadecentreadmefileinawaythatnormalhumansunderstanditis (Otherwise known as Thoreau Syndrome) so I thought I would save you some together time between your head and your monitor.
Now you could go download it from wherever it is, or you can just grab this which is nantcontrib post “fixing” it. Basically if you get my version, all you have to do is drop it somewhere, anywhere, and extract. I put it in the same directory that Nant is, so they sort of sit side by side but separate. A happy little couple, at least for the first few years until Nant has a mid life crisis and decides it’s time to get a Corvette and start rolling for college girls at which point nantcontrib starts eying the Fedex guy. Right now, its idealistic bliss.
Once you’ve done that, all you have to do is drop this bit into your nant script, probably above your properties, but it possibly can go other places. I haven’t really looked into that.
<loadtasks> <fileset> <include name="c:\nantcontrib\bin\lib\" /> </fileset> </loadtasks>
And now you are ready to go.
Now you might be curious about what I did to the directory structure of the nantcontrib stuff. It’s actually pretty simple. I just took the bin folder and split it up. (Something I kind of pieced together from random pages) I took what I understand to be the important stuff (All the dlls except CollectionGen.dll and SlingShot.core.dll.. wait I’m sorry SLiNgshoT.core.dll cause f—ed up casing means its that much better. ITS HARDCORE MAN! TO THE XXXXXXXTREEEEMEEEE!) and put it into a new folder “lib” that still resides in the bin folder. The rest of the stuff went into a new folder “tasks”. Then I had the loadtask command include everything in bin\lib. Boom, everything works as it should.
5 thoughts on “How to Install/Using NantContrib BECAUSE THE DOCUMENTATION SUCKS”
I feel you man. I was struggling with NAnt and NAntContrib myself, and ended up writing this blog entry myself. It really sucks how many times we have to reinvent the wheel with this kind of stuff.
I very much appreciate you documenting this! Thanks very much 🙂
A simpler approach would be to create a folder under your NAnt installation at the path “binextensionscommonneutralNAntContrib” and copy the NAntContrib files there. Then you will not need to add the loadtasks line to every script.
sorry but the readme.txt is completly clear in what to do and it does not take more than 5 min to merge nant with nantcontrib..
2. Copy the content of the NAntContrib bin directory to the NAnt directory
You should eventually end up with the following directory structure:
NAnt.Contrib.Tasks.pdb (not available for releases)
Note: you might have to manually create the “tasksnet” and “libnet” directories.
easy, isn’t it ?
I really don’t remember since this was posted months ago, but I have enough faith in myself that if I needed to post this, it wasn’t completely clear.
I’ll admit I’m not the brightest banana in the shed, but I have a hard time believing I’m the only one that doesn’t find the readme very accommodating.
Comments are closed.