views:

128

answers:

3

I have a .net assembly that contains data access code (a bunch of Typed Datasets and helper classes) that is quite large on disk (~2.5MB). What can I do to work out why it's so big and make it smaller?

+2  A: 

You can reduce the amount of information in the assembly. If the typed datasets are not always used, moving the various ones into separate assemblies referenced by one central assembly can be an effective approach. Then the runtime will only load the assemblies as needed.

Otherwise, there is little you can do without actually reducing the amount of code in the assembly itself. An obfuscator can help reduce the size somewhat, since it will shrink the names, but this will likely be a minor improvement.

Reed Copsey
+2  A: 

You can possibly compress resources or DLL's, at the cost of slower application startup. See this article or use the free open source .NETZ tool here.

Jon Galloway
Yea, that's where I was looking. It's about the most effective thing one can do really.
Kyle Rozendo
A: 

MS ILMerge might make smaller assemblies (not too sure how it merges duplicate declarations etc)? worth a look i guess

fusi