tag:help.appveyor.com,2012-11-13:/discussions/suggestions/592-speeding-up-chocolatey-downloads-and-installsAppVeyor: Discussion 2018-08-25T01:54:50Ztag:help.appveyor.com,2012-11-13:Comment/361918152015-03-04T18:09:29Z2015-03-04T18:16:20ZSpeeding up Chocolatey downloads and installs.<div><p>Anyway, caching Chocolatey packages/installations might be
tricky as it depends on whether the package is "portable" or
"native" (e.g. packages which are installed from MSI to Program
Files).</p>
<p><code>C:\Users\appveyor\AppData\Local\Temp\chocolatey\</code> is
used as a temp location for downloading packages - I don't think it
should be cached.</p>
<p>Portable packages (<code>7xip.commandline</code> is a good
example) are installed to
<code>C:\ProgramData\chocolatey\lib</code> and "shim" is added to
<code>C:\ProgramData\chocolatey\bin</code>. So, the solution for
caching portable packages could be:</p>
<pre>
<code>cache:
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml</code>
</pre>
<p>If your build logic is in some <code>my_build.cmd</code> you can
use it as a dependency instead of <code>appveyor.yml</code>.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/361918152015-03-06T07:49:53Z2015-03-06T07:49:53ZSpeeding up Chocolatey downloads and installs.<div><p>Evidently when I cancel a build, it removes the console output,
otherwise I would have shown you that the caching of
<code>C:\ProgramData\chocolatey\lib</code> for "native" installs
(downloads an exe) causes the install to not take place because the
[small] nupkg is already in place. The end result is the
application doesn't work.</p>
<p>For now, caching the Temp dir and not the lib and bin files is
working.</p></div>nathantag:help.appveyor.com,2012-11-13:Comment/361918152015-03-06T15:04:43Z2015-03-06T15:04:43ZSpeeding up Chocolatey downloads and installs.<div><p>So, every time you cancel a build its console cleared or it's
sporadic error? How long does it take to build before you
cancel?</p>
<p>-Feodor</p></div>Feodor Fitsner