Ajax Minifier Visual Studio include all javascript files

Posted by Michael on Stack Overflow See other posts from Stack Overflow or by Michael
Published on 2009-12-15T16:13:54Z Indexed on 2010/06/01 2:23 UTC
Read the original article Hit count: 731

Filed under:
|
|
|
|

I am using the Ajax Minifier http://www.ajaxprojects.com/ajax/tutorialdetails.php?itemid=766 and have embedded it in the csproj file for use in Visual Studio 2008 (not the free version). I have two folders, Content and Scripts, directly under the root of the project. Also, the Content folder has subfolders, and would like to include all of these as well (if I have to manually add each subfolder that is fine as well).

Currently, my csproj file looks like this (and is included within the Project tags as instructed). There are no build errors, the files simply do not get minified. (I've enabled Project -> View All files)

<Import Project="$(MSBuildExtensionsPath)\Microsoft\MicrosoftAjax\ajaxmin.tasks" />
<Target Name="AfterBuild">
  <ItemGroup>
    <JS Include="Scripts\*.js" Exclude="Scripts\*.min.js;"/>
    <JS Include="Content\**\*.js" Exclude="Content\**\*.min.js;"/>
  </ItemGroup>
  <AjaxMin SourceFiles="@(JS)" SourceExtensionPattern="\.js$" TargetExtension=".min.js" />
</Target>

How would I edit the csproj file in order to include these folders?

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET