I don't propose anything but I think you just did :) Using the FrameworkConfigurable attribute seems a reasonable way to do this.
I wouldn't worry too much about third party tasks just yet. Hopefully they'll maintain the same commanline interface across platforms. We're only getting this issue here because mcs and mono's resgen take different args to the ms versions.
Ian Gert Driesen wrote:
Hi,
What do you propose to use to configure framework-specific logic (depending on framework capabilities) ? Should we just add properties to the tasks with only FrameworkConfigurable attributes assigned to them, so we can use these properties to check whether a framework supports a certain (command line) feature ?
eg.
[TaskName("resgen")] public class ResGenTask : ExternalProgramBase { .....
[FrameworkConfigurable("supportsassemblyreferences")] public virtual bool SupportsAssemblyReferences { .... } }
[TaskName("csc")] public class CscTask : CompilerBase { .....
[FrameworkConfigurable("supportspackagereferences")] public virtual bool SupportsPackageReferences { .... } }
and then have the following framework config section in the NAnt configuration file :
<framework name="mono-1.0" ...> .... <tasks> <task name="resgen"> <attribute name="exename">monoresgen</attribute> <attribute name="useruntimeengine">true</attribute> .... <attribute name="supportsassemblyreferences">false</attribute> </task> <task name="csc"> <attribute name="exename">${path::combine(prefix, 'lib/mono/1.0/mcs.exe')}</attribute> <attribute name="useruntimeengine">true</attribute> .... <attribute name="supportspackagereferences">true</attribute> </task> </tasks> .... </framework>
What do you think ? Should we proceed like this ? We should actually also think of a way to allow third party tasks to specify this information too, as they can't just add their information to the NAnt configuration file (well they can, but I don't think its very user-friendly) ..
Gert
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers
--
Ian MacLean, Developer, ActiveState, a division of Sophos
http://www.ActiveState.com
------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers