I solved this problem.  I was compiling my custom tasks DLL using a version of NAnt different than the version I was running against.  The binaries were incompatible somehow.  So it wasn't a NAnt problem.

Thanks for the help of those that replied to me.

Best,
Garrett Smith
 
>
>
> I've written a custom task, put the compiled DLL in the same directory as
> nant.exe, named it XXXTasks.dll, and my public class inherits from task
> and has the TaskNameAttribute.
>
> But when I attempt to use it, I get the following:
>
> [Core.TypeFactory:Error loading Elements from
> Allstate.AllCorp.CustomNantTasks,Version=1.0.1537.25977, Culture=neutral,
> PublicKeyToken=null(d:\allcorp\tools\bin\allstate.allcorp.customnanttasks.dll).
>  - [] <>]
> Exception: System.Reflection.ReflectionTypeLoadException
> Message: One or more of the types in the assembly unable to load.
> Source: mscorlib
>    at System.Reflection.Module.GetTypesInternal(StackCrawlMark& stackMark)
>
>    at System.Reflection.Assembly.GetTypes()
>    at NAnt.Core.TypeFactory.AddDataTypes(Assembly taskAssembly)
>
>
> Best,
> Garrett

Reply via email to