This project is read-only.

Compiling From Source

Apr 17, 2012 at 10:22 PM
Edited Apr 17, 2012 at 10:26 PM

Downloaded from source, I am aware of but not familiar with .snk files, but they seem to be missing. and I cannot compile.

I work on Axiom 3D and we are replacing SharpZipLib with DotNetZip.

and assistance would be appreciated.  I know of the source key stuff but never use it, and normally avoid

projects that do, but I have been tasked with this so I need to work around it/through it, over it or under it. :)

Thanks in advance,


a.k.a theMouse on Axiom3D


Apr 23, 2012 at 10:55 AM

Instead of recompiling the source, why don't you just distribute the dll with your application? You can also use ILMerge to combine it with your executable.

May 7, 2012 at 2:09 PM

You can generate your own key file (see and compile the source code with a new key, but be aware that you are then creating your own version of DotNetZip, and you take the responsibility to update 'your version' upon yourself. I.e. if you just download (or NuGet) DotNetZip dll, all you need to do is reference the dll. Each time there is a new version, you just need to replace the dll and recompile (easier with NuGet). If you want to avoid distributing 'yet another dll' then use ILMerge as @Aerowinder mentionned.

May 14, 2012 at 9:54 PM

You should also see the embed option 

for those into VB here it is - ensure you don't call any of your embeded dll's methods from within the entry point method

Imports System.Globalization
Imports System.Reflection
Function Main(args() As String) As Integer 
  AddHandler AppDomain.CurrentDomain.AssemblyResolve, New ResolveEventHandler(AddressOf Resolver)
  Return Go(args) 
End Function
Private Function Resolver(ByVal sender As Object, ByVal args As ResolveEventArgs) As System.Reflection.Assembly
  Dim a As Assembly = Assembly.GetExecutingAssembly()
  Dim s As Stream = Nothing
  If args.Name.StartsWith("DotNetZip") Then
    s = a.GetManifestResourceStream("YourNameSpace.DotNetZip.dll")
    'If it fails -> view a.GetManifestResourceNames()
  End If
  Dim block As Byte() = New Byte(CInt(s.Length - 1)) {}
  s.Read(block, 0, block.Length)
  Dim a2 As Assembly = Assembly.Load(block)
  Return a2
End Function