ASP.Net Compiler Task

haf edited this page Oct 4, 2011 · 2 revisions

You can now run the ASP.NET Compiler on your web projects.

How to use ASP.Net Compiler Task

Invoked command AspNetCompiler.exe [options] <target_path>

aspnetcompiler :precompile do |c|
  c.physical_path = "src/MyWebProject.WebApplication"
  c.target_path = "bin/MyWebProject.WebApplication"
  c.updateable = true
  c.force = true
end

Configuration Options

Switches to the compiler.

physical_path (Optional) [-p]

Default: nil

Specifies the physical path of the application to be compiled. If this parameter is missing, the IIS metabase is used to locate the application. This parameter corresponds to the -p switch on aspnet_compiler.exe.

target_path (Optional)

Default: nil

Specifies the physical path to which the application is compiled. If not specified, the application is precompiled in-place.

updateable (Optional) [-u]

Default: false

If this parameter is true, the precompiled application will be updateable. The default value is false.

force (Optional) [-f]

Default: false

If this parameter is true, the task will overwrite the target directory if it already exists. Existing contents are lost. The default value is false.

clean (Optional) [-c]

Default: false

If this parameter is true, the precompiled application will be built clean. Any previously compiled components will be recompiled. The default value is false.

debug (Optional) [-d]

Default: false

If this parameter is true, the strong-name assembly will allow partially trusted callers.

delay_sign [-delaysign]

Default: false

If this parameter is true, the assembly is not fully signed when created.

fixed_names [-fixednames]

Default: false

If this parameter is true, the compiled assemblies will be given fixed names.

virtual_path [-v]

Default: '/'

The virtual path of the application to be compiled. If PhysicalPath specified, the physical path is used to locate the application. Otherwise, the IIS metabase is used, and the application is assumed to be in the default site.