Bugs item #1250182, was opened at 2005-08-02 12:34
Message generated for change (Comment added) made by innesm
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1250182&group_id=31650
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Tasks
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Innes MacKenzie (innesm)
Assigned to: Nobody/Anonymous (nobody)
Summary: Solution task puts read-only files in build directories.
Initial Comment:
When building a solution in nant, using the 'solution'
task, readonly DLLs and config files appear to retain
their readonlyness when copied into the output directory.
In contrast VS.NET creates writeable copies of files
when copying readonly files to the output directory.
This difference in behaviour can cause problems.
----------------------------------------------------------------------
>Comment By: Innes MacKenzie (innesm)
Date: 2005-08-07 12:31
Message:
Logged In: YES
user_id=1322576
Adding code to make the destFile writeable after the call to
CopyFile in ManagedProjectBase fixes this problem. I did
this by running an AttribTask child task in the same way
CopyFiles uses a CopyTask to copy the file. Helper methods
added to ProjectBase are pasted below.
private static void InitialiseChildTask(Task parent,
Task ct)
{
// parent is solution task
ct.Parent = parent;
// inherit project from parent task
ct.Project = parent.Project;
// inherit namespace manager from parent task
ct.NamespaceManager = parent.NamespaceManager;
// inherit verbose setting from parent task
ct.Verbose = parent.Verbose;
// only output warning messages or higher, unless
// we're running in verbose mode
if (!ct.Verbose) {
ct.Threshold = Level.Warning;
}
// make sure framework specific information is set
ct.InitializeTaskConfiguration();
// increment indentation level
ct.Project.Indent();
}
protected void MakeFileNonReadonly(FileInfo f, Task parent)
{
AttribTask attrib = new AttribTask();
attrib.File = f;
attrib.NormalAttrib = true;
InitialiseChildTask(parent, attrib);
try {
// execute task
attrib.Execute();
}
finally {
// restore indentation level
attrib.Project.Unindent();
}
}
----------------------------------------------------------------------
Comment By: Innes MacKenzie (innesm)
Date: 2005-08-02 20:36
Message:
Logged In: YES
user_id=1322576
I'm using version 0.85 rc3.
----------------------------------------------------------------------
Comment By: Gert Driesen (drieseng)
Date: 2005-08-02 20:20
Message:
Logged In: YES
user_id=707851
What version of NAnt are you using ?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1250182&group_id=31650
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
nant-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-developers