views:

280

answers:

1

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?

A: 

A little too late for this answer, but try this:

<JS Include="**\*.js" Exclude="**\*.min.js;"/>
minalg