The Microsoft Ajax Minimizer can be configured so that with Compilation the js files are automatically minimized. Don’t put the minimized files in TFS otherwise those files can’t be updated because they are read-only, this is by Design.
1. put this at the end of you webproj file:
2. Include those generated minimized script files in your project.
3. Dont put those generated script files in TFS otherwise they become read-only and can’t be regenerated again.
4. Use a extension function to read DEBUG and use this function for including the .min.js or .js version of your scripts files. When DEBUG use .js files, when RELEASE use .min.js files. That way you also can run-time debug your script .js files.
5. If there are script files in your directory that you dont need in your project (may be already deleted from the project but still there), dump them otherwise they will also be minimized and that takes time.
6. If a script file is NOT minimized that can be caused by a syntax error in your script file, so correct this first.