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

ASP NET Merge tool allows user to manage and combine assemblies that are created using ASP NET Compilation tool. It works only on assemblies that have been created by using ASP.NET 2.0 or higher.This tool creates one assembly for each folder in target application or it creates each assembly for each file.This tool gives you additional functionality for management and deployment. It allows user to do the following operations.Create single assembly for just single web application UI elements such as controls and pagesCreate assembly for whole web applicationCreate assembly for each web application and affix to assembly name

Syntax

aspnet_merge     [-?]     //  -? displays command syntax

applicationPath

[-keyfile filename [-delaysign]] 

[-o assemblyname | -w assemblyname | -prefix prefix]

[-copyattrs [assemblyfile]]

[-debug]

[-nologo]

[-errorstack]

[-r]

[-xmldocs]

[-a]

[-logfile logfile]

[-allowattrs textfile]

Example

The command stated below merges the assemblies of the precompiled site in the C:\PreCompSite directory.

Aspnet_merge C:\ PreCompSite
The command stated below merges assemblies of a precompiled web application in the C:\ PreCompSite directory and signs the merged assemblies by using the KFile.snk file. The merged application will have one assembly for each precompiled application folder.
Aspnet_merge C:\ PreCompSite -keyfile KFile.snk
The command stated below merges all assemblies of the precompiled site in the C:\ PreCompSite directory into a single assembly and names the resulting assembly MyWebApplication.dll. The merged site will have one assembly for all Web site UI content.
Aspnet_merge C:\ PreCompSite -w MyWebApplication.dll
The command stated below merges all assemblies of the precompiled site in the C:\ PreCompSite directory into a single assembly and names the resulting assembly MyWebApplication.dll.
Aspnet_merge C:\ PreCompSite -o MyWebApplication.dll
Why to Use Aspnet_merge tool

Please refer to my previous post ASP.Net Compilation and Merge Tool (Part 1 of 2) for advantages.

kick it on DotNetKicks.com

1 Comment

  • Hi Tony
    ASP.NET Merge tool can be used in three options:
    Merge all outputs into a single assembly.
    "Merge each folder's Web UI content (Web pages, skins, and so on) into its own assembly."
    Merge all Web UI content in the site into a single assembly.

    Answer to your question is in " ".

    Any Questions / Queries?
    Regards,
    Naveed Akhtar

Comments have been disabled for this content.