If you need to copy a folder together with all its contents to another folder in NAnt, you would typically write something like this:
It turns out this code works correctly in NAnt 0.92 Alpha and above. The output is expected:
However, the same code doesn’t work in prior versions of NAnt, for instance, 0.91. The output is as follows (only in –debug+ mode):
Obviously, the issue was fixed in 0.92, so the best recommendation would be to upgrade NAnt toolkit. However, if this is not an option for some reason, the following code seems to work correctly for any version:
Hope this saves you some time.
<copy todir="${target}"> <fileset basedir="${source}" /> </copy>
[copy] Copying 1 directory to '...'.
[copy] Copying 0 files to '...'.
<copy todir="${target}"> <fileset basedir="${source}"> <include name="**/*" /> </fileset> </copy>
Very Good Information.
ReplyDeleteThanks!
DeleteHey!
ReplyDeleteI really appreciate for your work. Please update this regularly. What a commendable work you have done, with simplest of language. I can’t resist myself to leave a comment and trust me it’s hard to impress me.
Vachel
PHP Development Chicago
.NET Development Chicago
Chicago Development Team
cmscentral.net
Thanks for your praise! I'll try to post more often, :-)
DeleteI have search this code some time thank for providing this code please providing some code.
ReplyDeletePHP Chicago
I was surfing the Internet for information and came across your blog. I am impressed by the information you have on this blog. It shows how well you understand this subject. photocopy
ReplyDeleteI was reading some of your content on this website and I conceive this internet site is really informative ! Keep on putting up. canon photocopier
ReplyDelete