Home / AJAX

Page History: Microsoft Ajax Minifier Quick Start

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2009/12/15 23:31


Using the Microsoft Ajax Minifier from the Command Line

After you install the Microsoft Ajax Minifier, you can use the tool from the command line. Open the Microsoft Ajax Minifier Command Prompt from the Microsoft Ajax Minifier program group. Next, enter the name of an input file and the name of an output file like this:

ajaxmin test.js -o test.min.js

Image

The Microsoft Ajax Minifier will report how much it was able to minify the file (for example, 43%).

You also can use the Microsoft Ajax Minifier to minify Cascading Style Sheet files. You use the same syntax:

ajaxmin test.css -o test.min.css

Using the Microsoft Ajax Minifier as a Build Task

You can integrate the Microsoft Ajax Minifier into your Visual Studio Build process. Every time you perform a build in a Visual Studio ASP.NET project, you can minify all of your JavaScript and Cascading Style Sheet files automatically.

Follow these steps:

  1. Within Visual Studio, select the menu option Tools, Options, Projects and Solutions. Check the checkbox labeled Always show solution



Image