NAnt, NAntContrib and sln
June 22nd, 2010
When running a NAnt build for a project I am working on at the moment I got the following error:
“Failure scanning ‘{PathToNAnt.Contrib.Tasks.dll}’ for extensions. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.”
This was obviously related to the NAntContrib <msbuild> task as per target below:
<target name=”devBuild” depends=”cleanDev” description=”">
<loadtasks assembly=”{PathToNAntContribTasksdll}” />
<msbuild project=”{SolutionFile.sln}” />
</target>
In the end, the problem was the version of NAntContribTasks.dll I was using (0.84). I downloaded 0.85 and pointed to it instead and life is beautiful again.
Thanks for this tidbit, I had the exact same problem. Irritatingly the “stable release” link for nant-contrib is 0.84, so this error comes as default for msbuild users. Dropping 0.85 into my nant bin folder fixed it nicely.