title: MSBuild.Community.Tasks and Zip, set zip folder structure
body: <p>I have an MSBuild script as shown below, which grabs the class library <code>Bin\Release\MyLib.dll</code> and zips it into <code>C:\1.zip</code>.</p>
  
  <p>When I open the zip file I see <code>MyLib.dll</code> file in the parent folder.</p>
  
  <p>But I would like to have a directory structure in the ZIP file, so the file would be zipped as <code>lib\MyLib.dll</code></p>
  
  <p>How can I do that?</p>
  
  <pre><code>&lt;Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/&gt;
      &lt;Target Name="AfterBuild"&gt;
          &lt;PropertyGroup&gt;      
              &lt;ReleasePath&gt;bin\Release\&lt;/ReleasePath&gt;
          &lt;/PropertyGroup&gt;
      &lt;ItemGroup&gt;      
          &lt;ReleaseApplicationFiles
              Include="$(ReleasePath)\**\*.*"
              Exclude="$(ReleasePath)\*vshost.exe*;$(ReleasePath)\*.pdb*" /&gt;
      &lt;/ItemGroup&gt;
      &lt;Zip Files="@(ReleaseApplicationFiles)" 
        WorkingDirectory="$(ReleasePath)"
        ZipFileName="c:\1.zip"
        ZipLevel="9" /&gt;
      &lt;/Target&gt;
  </code></pre>