[
  {
    "Id": "923565",
    "ThreadId": "398519",
    "Html": "\r\n<p>I am using DotNetZip 1.9.1.8 unmodified in an app for some time. I recently moved the app from one computer to a newer one and DotNetZip is now failing. To make maters more complicated I have a second app that I migrated over a week before, that works just\r\n fine.</p>\r\n<p>Error: Could not load file or assembly 'Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c' or one of its dependencies. Access is denied.</p>\r\n<p>This happens when the first function referring to a ZipFile&nbsp;type variable&nbsp;attempts to load.</p>\r\n<p>Here are the key diferences between the systems:<br>\r\n[Old System/New System]<br>\r\nOS: XP/Win7<br>\r\nVS version: 2008/2010<br>\r\nTarget CPU: msil/x86</p>\r\n<p>Both target .Net 3.5 and use the same version of Ionic.Zip.dll.</p>\r\n<p>A very similar app (using this same configuration) that a week earlier made the same transition, also using the same dll, is working just fine.</p>\r\n<p>Any idea as to what I should look for here?</p>\r\n<p>Jacob</p>\r\n",
    "PostedDate": "2012-10-08T10:32:34.277-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "923737",
    "ThreadId": "398519",
    "Html": "<p>I found a solution. Still working on an explanation.</p>\r\n<p>In the app with the error I am using DotNEtZip only within a worker thread. The Iconic.Zip.Dll assembly isn't actually loaded at runtime until it is referenced in a method, since that is in a worker thread the worker thread was attempting to load the assembly, which failed.</p>\r\n<p>I found that if I create a ZipFile object on load in the main thread then the dll is loaded&nbsp;by the main threat, which suceeded. Then, when the worker thread tried to use it later it was already loaded into the AppDomain and so it just worked.</p>\r\n<p>I still don't understand why it worked in the other App, which is also using it in a worker thread. I will post here if I figure it out.</p>\r\n<p>Jacob</p>",
    "PostedDate": "2012-10-08T16:28:29.587-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]