Testcase:

<?xml version="1.0" encoding="utf-8" ?>
<project name="Testcase" default="buildall">
    <property name="frameworks" value="net-1.0,net-1.1,mono-1.0,net-2.0"/>

        <target name="build">
        <csc target="library" output="Testcase.dll" keyfile="anyvalid.snk">
            <sources>
                <include name="anyvalid.cs"/>
            </sources>
        </csc>
    </target>

        <target name="buildall">
        <foreach item="String" in="${frameworks}" delim=","
property="framework">
                    <if test="${framework::exists(framework)}">
                        <property name="nant.settings.currentframework"
value="${framework}" />
                        <call target="build" />
                    </if>
        </foreach>
        </target>

</project>


You might also want to add 'supportskeyfile' to the beta versions of
.Net 2.0  in the App.config - I can't check this here.
Regards,
Brar Piening

diff -r nant-0.85-nightly-2005-11-13/src/NAnt.Console/App.config 
nant-0.85-nightly-2005-11-13_changed/src/NAnt.Console/App.config
352a353
>                             <attribute name="supportskeyfile">true</attribute>
358a360
>                             <attribute name="supportskeyfile">true</attribute>
diff -r nant-0.85-nightly-2005-11-13/src/NAnt.DotNet/Tasks/CompilerBase.cs 
nant-0.85-nightly-2005-11-13_changed/src/NAnt.DotNet/Tasks/CompilerBase.cs
69a70
>         private bool _supportsKeyFile;
399a401,411
>         /// <summary>
>         /// Indicates whether the compiler for a given target framework 
> supports
>         /// a command line option that allows the specification of a keyfile. 
>         /// The default is <see langword="false" />.
>         /// </summary>
>         [FrameworkConfigurable("supportskeyfile")]
>         public virtual bool SupportsKeyFile {
>             get { return _supportsKeyFile; }
>             set { _supportsKeyFile = value; }
>         }
> 
515c527
<                     if (KeyFile != null) {
---
>                     if (KeyFile != null && SupportsKeyFile) {
1086c1098
<             if (KeyFile != null) {
---
>             if (KeyFile != null && SupportsKeyFile) {

Reply via email to