ASP.Net Compilation and Merge Tool (Part 1 of 2)

ASP.NET Compilation tool is used to compile an ASP.NET Web application either in same machine or to deploy on a target machine such as a production server. It helps application performance because end users do not encounter a delay on the first request to the application while the application is compiled on backend.

 

Compilation for deployment can be in one or two ways

  • That removes all files such as code-behind and markup files
  • That retains markup files.
 Syntax

aspnet_compiler  [-?]

                 [-m metabasePath | -v virtualPath [-p physicalPath]]

                 [[-u] [-f] [-d] [-fixednames] targetDir]

                 [-c]

                 [-errorstack]

                 [-nologo]

                 [[-keyfile file | -keycontainer container ] [-aptca] [-delaysign]]

 

Example

Aspnet_compiler -v /WebApp1 -p "c:\MyProjects\WebApp1" -keyfile "c:\MyProjects\KeyWebApp1.sn" -aptca c:\applicationTarget

Why to use ASP.Net Compilation Tool 

People always ask, why I use ASP.Net Compilation tool. The answer is “precompiled ASP.Net 2.0 Web Application”. Following are the advantages to use ASP.Net Compilation and Merge Tool. According to MSDN

 
  • Security
  • Performance
  • Stability
 Security

Pre-compilation of ASP.Net Application slow down reverse engineering process, because it lacks the abstraction and readability of a high-level language.

 Performance

Compiled code faster than other scripting languages such as VBScript or ECMAScript because it is a closer to machine code and does not need additional parsing.

 Stability

Code is checked on compilation for syntax, type safety and other sort of problems by caching error at build process and then you can eliminate these errors.

  kick it on DotNetKicks.com

No Comments