Compress .NET exe

F

Fredrik Melin

I need suggestions on tools to compress dot net EXE's (its ridiculos how
large they are..)

I have a licenced copy of thinstall, but its old and have some bugs in it,
unfortunally they seems to have discontinued the support for it, and there
new system starts from $10.000. Ouch.

There is a opensource tool called NETZ, which sort of works, but my
application crashes later when using it (directly linked to if I compress it
or not)

So does anyone have a suggestion for a good tool for this purpose?

(I have no trouble paying for it if its good, not the 10000 range though)
I dont really care about encryption in the exe, im after just the
compression.

- Fredrik
 
H

Herfried K. Wagner [MVP]

Fredrik Melin said:
I need suggestions on tools to compress dot net EXE's (its ridiculos how
large they are..)

Are you storing lots of ressources (bitmaps, sounds, ...) inside the binary?
 
F

Fredrik Melin

Nope, not a single one.

But its a large application (lots of forms) that is updated everyday by
download (liveupdate-function) to hundreds of clients, its 18 meg
uncompressed, with zip or other compression its around 3MB
Saves alot of time if you count in all clients..

..NET exe is mainly plain text if you look at it hexadecimal it seems.

- Fredrik
 
H

Herfried K. Wagner [MVP]

Fredrik Melin said:
But its a large application (lots of forms) that is updated everyday by
download (liveupdate-function) to hundreds of clients, its 18 meg
uncompressed, with zip or other compression its around 3MB
Saves alot of time if you count in all clients.

I am not sure if decompressing a ZIP or CAB archive on the client within the
updating process is sufficient:

ZIP files:

The Zip, GZip, BZip2 and Tar Implementation For .NET
<URL:http://www.icsharpcode.net/OpenSource/SharpZipLib/>

The VB.NET Resource Kit contains zipping functionality too (note that the
Resource Kit is not available any more, so the answer applies for the case
that you already have a copy of the Resource Kit):

The Visual Basic .NET Resource Kit
<URL:http://msdn.microsoft.com/vbasic/vbrkit/>

It contains ComponentOne Zip for .NET:

ComponentOne ZipT for .NET
<URL:http://www.componentone.com/product...3569&SubCategoryTypeID=0&TabMapID=57&TabID=70>

Using J#'s zip functionality:

Using the Zip Classes in the J# Class Libraries to Compress Files and Data
with C#
<URL:http://msdn.microsoft.com/msdnmag/issues/03/06/zipcompression/>

..NET 2.0 will contain ZIP support too.

CAB files:

Microsoft Cabinet Software Development Kit
<URL:http://support.microsoft.com/?scid=kb;EN-US;310618>

You can build CAB files using the "MAKECAB.EXE" utility that is IIRC
included in Windows. For extracting CAB files, you can use Microsoft's
"EXTRACT.EXE", which is available on the Windows XP CD or as part of the
Windows XP Support Tools:

<URL:http://groups.google.de/[email protected]>

Alternative you can use p/invoke on 'SetupIterateCabinet'. A VB6 sample can
be found here:

View and Extract CAB File Contents Programmatically
<URL:http://www.thescarms.com/vbasic/CabExplorer.asp>
 
F

Fredrik Melin

Been down that road and didnt like it.

Im still looking for a exe compressor that will render a valid win32 exe out
of the .NET exe.
(keep version number etc in the new compressed exe, just smaller size)

Cheaper then thinstall and more bugfree then netz...

- Fredrik
 
G

Guest

Herfried, this is off topic but do you know if VB.Net 2005 will have a
resource kit available?
 
H

Herfried K. Wagner [MVP]

Dennis said:
Herfried, this is off topic but do you know if VB.Net 2005 will have a
resource kit available?

I don't know if Microsoft is planning a resource kit for VB 2005.
 
F

Fredrik Melin

as I stated in my original post, already tried NETZ and it seems to work,
but application crashes later when running it. (when you uses external
resources dll's)

Gonna look at the source for it, but was hoping there was more out there.
 
Joined
Jul 22, 2005
Messages
2
Reaction score
0
Use the latest .NETZ version

Hi,

As I stated before .NETZ tool has been updated to solve a bug with multiple dependecies in external DLLs

Your error will show if are using any .NETZ version older than 0.2.0.

Get the latest version, which solves the issue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top