New development. This happens when I compile and debug NAntContrib using
VS.NET. When do a clean build using NAnt things are working normally.
Screwy, but now I can work around it by debugging NAntContrib's library via
a Release version of NAnt. 

So it seems that VS.NET has problems with System.Reflection in the VS.NET
debugger. 

To answer the questiom:

StarTeamAutoLabel : LabelBase : StarTeamBase : SourceForge.NAnt.Task 

Which is why "type.BaseType.BaseType.BaseType" resolves to
SourceForge.NAnt.Task

-----Original Message-----
From: Scott Hernandez [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 11:03 AM
To: 'Kevin Miller'
Cc: 'Nant-Developers (E-mail)'
Subject: RE: [nant-dev] TaskFactory not finding tasks


What does the class definition look like?

> -----Original Message-----
> From: Kevin Miller
> Subject: [nant-dev] TaskFactory not finding tasks
> 
> I have a newly created task that is not being seen by NAnt. When I
debug
> the
> reflection into task dlls. It seems that IsSubclassOf is not working
> correctly. I had a similar problem the other day when I was compiling
my
> task in a seperate Dll. Weird thing is that currently all my other
tasks
> are
> passing this evaluation.
> 
> // --- I modified the code for easier debugging ---
> Type taskClass = typeof(Task);
> foreach(Type type in assembly.GetTypes()) {
>       if (type.IsSubclassOf(taskClass)) {
>               if(type.IsAbstract) continue;
> 
>               //... Never gets here for new task
> 
>       }
> }
> 
> Debugger values:
> //type being considered
> +     type    {"NAnt.Contrib.Tasks.StarTeam.StarTeamAutoLabel"}
> System.Type
> //evidence that this class IS a subclass of Task
> +     type.BaseType.BaseType.BaseType {"SourceForge.NAnt.Task"}
> System.Type
> //actual evaluation
> type.IsSubclassOf(taskClass)  false   bool
> //for show
> type.IsAbstract       false   bool
> 
> Do not know what I am doing wrong in my class. Or why Reflection is
> messing
> up. Any ideas?
> 
> Kevin Miller



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to