Gert Driesen wrote:
Hi,
In .NET 2.0 (beta 2), quite some options have been added to the command-line compilers.
For example, for csc these are :
/keyfile:<file> /keycontainer:<string> /platform:<string> /reference:<alias>=<file> /langversion:<string> /pdb:<file> /moduleassemblyname:<string>
Now, the question is: how do we expose these options to build authors and still avoid confusing build authors that target older versions of .NET (that do not support these options) ?
Do we
1. just expose these options as attribute of the csc task itself
For example:
<csc keyfile="key.snk" platform="x86" pdb="assembly.pdb" .... />
-or-
2. add nested child element for the .NET 2.0 specific options
<csc ...> <whidbey keyfile="..." /> </csc>
-or-
3. add a csc2 task that derives from csc
<csc2 keyfile="..." ... />
What do you think ?
I don't like 2 and 3 much as they will get very ugly if successive versions of the compilers add new features like this. Could we use 1 but mark the new options with a CustomAttribute indicating their version. Then at load time we can match that against the current framework version and throw an exception if the option is not allowed with the currently targetted compiler. This could also be used when we generate the task doc to clearly mark the new options as 2.0 only.
Ian
------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers