using <zip> task

128 views
Skip to first unread message

Udit

unread,
May 1, 2008, 6:57:38 PM5/1/08
to ccnet-user
Hello,
I was trying to use <zip> task in my Nant script but was never able
to use it.
I download the dlls from the website. http://www.icsharpcode.net/OpenSource/SharpZipLib/Download.aspx

Uses #ziplib (SharpZipLib), an open source Tar/Zip/GZip library
written entirely in C#.

I put it in my Nant/bin folder and then edited my Nant script to load
it.

<loadtasks assembly="D:\Program Files\Nant\bin
\ICSharpCode.SharpZipLib.dll" />
<zip zipfile="website.zip">
<fileset basedir="${Working}" prefix="bin">
<include name="**/*" />
</fileset>
</zip>

But still it doesnt work and gives me this error.

[loadtasks] Scanning assembly "ICSharpCode.SharpZipLib" for
extensions.

BUILD FAILED

INTERNAL ERROR

System.IO.FileLoadException: Could not load file or assembly
'ICSharpCode.SharpZipLib, Version=0.84.0.0, Culture=neutral,
PublicKeyToken=1b0
3e6acf1164f73' or one of its dependencies. The located assembly's
manifest definition does not match the assembly reference. (Exception
from
HRESULT: 0x80131040)
File name: 'ICSharpCode.SharpZipLib, Version=0.84.0.0,
Culture=neutral, PublicKeyToken=1b03e6acf1164f73'
at NAnt.Compression.Tasks.ZipTask.ExecuteTask()
at NAnt.Core.Task.Execute()
at NAnt.Core.Target.Execute()
at NAnt.Core.Project.Execute(String targetName, Boolean
forceDependencies)
at NAnt.Core.Project.Execute()
at NAnt.Core.Project.Run()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM
\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind
failure logging.
To turn this feature off, remove the registry value [HKLM\Software
\Microsoft\Fusion!EnableLog].


Please send bug report to nant-de...@lists.sourceforge.net.

Total time: 0.2 seconds.

I am using .NET Framework 2.0 and Nant Version 0.85
I used the dll provided for .Net 2.0.
Please help..
thanks in advance
Udit

Perry Ismangil

unread,
May 1, 2008, 7:05:51 PM5/1/08
to ccnet...@googlegroups.com
On Thu, May 1, 2008 at 11:57 PM, Udit <udi...@gmail.com> wrote:
>
> Hello,
> I was trying to use <zip> task in my Nant script but was never able
> to use it.
>
> I put it in my Nant/bin folder and then edited my Nant script to load
> it.
>
> <loadtasks assembly="D:\Program Files\Nant\bin
> \ICSharpCode.SharpZipLib.dll" />

The zip task does not need any loadtask elements. Try removing it.

Strictly speaking, as the error message says, this is a NAnt issue,
not ccnet issue :)

--
Perry Ismangil

Peter Lanoie

unread,
May 1, 2008, 7:05:51 PM5/1/08
to ccnet...@googlegroups.com
The zip task is a built in part of NAnt.  You should not need to put any additional binaries into the nant runtime directory.  Plus, the #ziplib won't have anything defined as nant tasks anyway.  It only has the code for the (un)zipping logic.   Loading that assembly won't do anything and is likely the source of the problem to begin with.

Udit

unread,
May 1, 2008, 10:20:28 PM5/1/08
to ccnet-user
it worked..
Thanksss a million...!
> > Please send bug report to nant-develop...@lists.sourceforge.net.
Reply all
Reply to author
Forward
0 new messages