[
  {
    "Id": "677923",
    "ThreadId": "274175",
    "Html": "<p>As the discussion name stated, I want to distribute SFX with a custom stub to my users. I understand that .Net runtime is required on users's computers since the stub is written in .Net. The question is: do I have to include the Ionic.Zip.dll in the SFX? Since the extraction logic in the stub is using objects derived from the dll, I am guessing the dll has to be in the same folder as the SFX because user computers do not have that dll.</p>\n<p>So If the answer is yes, then how should I include the dll in the SFX? Do I have to include it as a zip item&nbsp;and extract&nbsp;it out to the same folder&nbsp;first when the user invokes the SFX, or as a embedded resource that also needs to be extracted first before the stub logic can run?&nbsp;</p>\n<p>I guess even I extract the dll&nbsp;in the first line of the stub logic,&nbsp; it may still not work becuase Wondows may check the presence of required dll before it actually&nbsp;invoke the&nbsp;SFX, generating a file or assembly not found error in&nbsp;the first place.</p>\n<p>Any ideas?</p>",
    "PostedDate": "2011-09-28T16:10:01.313-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "679175",
    "ThreadId": "274175",
    "Html": "<p>Yes, you need to include Ionic.Zip.dll into the SFX.&nbsp; The way to do it is to embed the DLL as a resource in the SFX, and use an assembly resolver at runtime. Like this: <a href=\"http://stackoverflow.com/questions/96732/embedding-one-dll-inside-another-as-an-embedded-resource-and-then-calling-it-from\">http://stackoverflow.com/questions/96732/embedding-one-dll-inside-another-as-an-embedded-resource-and-then-calling-it-from</a></p>\r\n<p>You should not attempt to put the Ionic.Zip.dll as an item in the ZIP archive. That wouldn't work - you need Ionic.Zip.dll to read the zip, so putting the DLL into the zip won't help you.&nbsp;(You'd have to read the zip to get the library but you need the library to read the zip).</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2011-10-02T16:20:09.307-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]