title: Ajax Minifier to Deploy Package .zip
body: <p>I'm using AjaxMin to minify my .js and .css files this is configured within my Release.pubxml file and it works fine as when I navigate to the Release/Package/PackageTemp folder the .js and .css have been minified correctly.</p>
  
  <p>However when I navigate to the actual Package .zip file the .js and .css files have not been minified they are just the original files. I assume that the files in my PackageTemp are not replacing the Package deploy files and I'm not sure how to achieve this from within my .pubxml file. My .pubxml file currently looks this this: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;!--
  This file is used by the publish/package process of your Web project. You can customize the behavior of this process
  by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121. 
  --&gt;
  &lt;Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
    &lt;PropertyGroup&gt;
      &lt;WebPublishMethod&gt;Package&lt;/WebPublishMethod&gt;
      &lt;LastUsedBuildConfiguration&gt;Release&lt;/LastUsedBuildConfiguration&gt;
      &lt;LastUsedPlatform&gt;Any CPU&lt;/LastUsedPlatform&gt;
      &lt;SiteUrlToLaunchAfterPublish /&gt;
      &lt;LaunchSiteAfterPublish&gt;True&lt;/LaunchSiteAfterPublish&gt;
      &lt;ExcludeApp_Data&gt;True&lt;/ExcludeApp_Data&gt;
      &lt;DesktopBuildPackageLocation&gt;C:\Documents\TestDeploy&lt;/DesktopBuildPackageLocation&gt;
      &lt;PackageAsSingleFile&gt;true&lt;/PackageAsSingleFile&gt;
      &lt;DeployIisAppPath /&gt;
      &lt;PublishDatabaseSettings&gt;
        &lt;Objects xmlns="" /&gt;
      &lt;/PublishDatabaseSettings&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;Import Project="$(MSBuildExtensionsPath)\Microsoft\MicrosoftAjax\AjaxMin.targets" /&gt;
    &lt;PropertyGroup&gt;
      &lt;OnAfterPackageUsingManifest&gt;
        $(OnAfterPackageUsingManifest); Minify;
      &lt;/OnAfterPackageUsingManifest&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;Target Name="Minify" AfterTargets="CopyAllFilesToSingleFolderForPackage"&gt;
      &lt;ItemGroup&gt;
        &lt;JS Include="$(_PackageTempDir)\**\*.js" Exclude="$(_PackageTempDir)\**\*.min.js;" /&gt;
        &lt;CSS Include="$(_PackageTempDir)\**\*.css" Exclude="$(_PackageTempDir)\**\*.min.css" /&gt;
      &lt;/ItemGroup&gt;
  
      &lt;Message Text="**************MINIFYING**************" Importance="high"&gt;&lt;/Message&gt;
      &lt;AjaxMin JsSourceFiles="@(JS)" JsSourceExtensionPattern="\.js$" JsTargetExtension=".js" CssSourceFiles="@(CSS)" CssSourceExtensionPattern="\.css$" CssTargetExtension=".css" /&gt;
    &lt;/Target&gt;
  
    &lt;PropertyGroup&gt;
      &lt;ExcludeFoldersFromDeployment&gt;bin&lt;/ExcludeFoldersFromDeployment&gt;
    &lt;/PropertyGroup&gt;
  
  &lt;/Project&gt;</code></pre>
  </div>
  </div>
  
   Please could someone shed some light on how to replace the files in my deploy .zip file with the PackageTemp Files via my .pubxml file  </p>
  
  <p>Thanks</p>