DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15568>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15568

outputFile attribute in ILASM task cannot create new file

           Summary: outputFile attribute in ILASM task cannot create new
                    file
           Product: Ant
           Version: 1.5.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Optional Tasks
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Look at the processing of the outputFile attribute in the 
org.apache.tools.ant.taskdefs.optional.dotnet.Ilasm class:

    protected String getOutputFileParameter() {
        if (outputFile == null || outputFile.length() == 0) {
            return null;
        }
        File f = outputFile;
        return "/output=" + f.toString();
    }

If the "outputFile" field were a String, this would be correct; it would check 
if the field had been set to a non-empty string.  Since outputFile is a File, 
it checks whether the file exists and has non-zero length.  The result is that 
output will be set to the specified location only if the file already exists 
with non-zero length.  

Workaround: in the ANT script, first use "echo" to create the target file, then 
call the ilasm task.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to