Advanced Precompile Settings Dialog Box
The Advanced Precompile Settings dialog box lets you specify how a web application is precompiled or assemblies are merged.
This topic applies to Visual Studio 2012 and Visual Studio Express 2012 for Web. The topic covers features that are included in the latest Visual Studio Web Publish Update available as of June, 2013. Most of these features are also available in Visual Studio 2010 and Visual Web Developer 2010 Express when you install the Web Publish Update.
To access this dialog
In Visual Studio, open a web application project.
Right click the project name in Solution Explorer, and then choose Publish.
Select the Settings tab.
Expand File Publish Options, and then select Precompile during publishing.
Use IIS metabase path for source input
This setting corresponds to the -m option of the aspnet_compiler.exe command. For example, a metabase path might be /IISExpress/7.5/LM/W3SVC/2/ROOT/MyWeb/, where MyWeb is the virtual directory.
This setting is useful if your web site contains one or more sub-web sites. During compilation, the compiler processes all the files in a directory tree. If there are sub-web sites, this will result in build errors. To avoid these errors, you can specify the IIS metabase path of the web site you are compiling, which causes the ASP.NET compiler to skip any sub-web sites defined in the IIS metabase.
Allow precompiled site to be updatable
This setting corresponds to the –u option of the aspnet_compiler.exe command.
If you select this option, pages and user controls (.aspx, .ascx, and .master files) are copied as-is to the target folder and can be updated as text files without recompiling the project. Otherwise, the HTML markup for pages and user controls is removed and compiled into the assembly output.
Emit debug information
This setting corresponds to the -d option of the aspnet_compiler.exe command.
Do not merge
This setting does not run aspnet_merge.exe and does not use the -fixednames option of the aspnet_compiler.exe command.
Do not merge. Create a separate assembly for each page and control
This setting does not run aspnet_merge.exe. Instead, it uses the -fixednames option of the aspnet_compiler.exe command.
This option is useful if you want to make granular updates of your deployed web site. However, compiling with the -fixednames option disables the compiler's batch optimizations and can result in longer compile times for large web sites.
Merge all outputs to a single assembly
This setting is equivalent to the -o assemblyname option of the aspnet_merge.exe command.
Treat as library component (remove the App_Code.compiled file
This setting corresponds to the -r option of the aspnet_merge.exe command.
Selecting this option enables the project's App_Code.dll assembly to be added to the Bin folder of another web site without conflicting with the App_Code.dll assembly in the other web site. This is useful for building a library of .ascx controls
Merge each individual folder output to its own assembly
This setting corresponds to the -prefix prefixname option of the aspnet_merge.exe command.
This option enables you to update your web site at the folder level rather than updating the entire application. You can use the Optional assembly prefix box to specify a prefix that will be pre-pended to all generated assembly names. For example, if you specify the prefix MyCompany, the name becomes MyCompany.SubfolderName.
Merge all pages and control outputs to a single assembly
This setting corresponds to the –w assemblyname option of the aspnet_merge.exe command.
This option enables you to update UI elements separately from updating other code. Special folders such as App_Code, App_WebReferences, and so on are each compiled into a separate assembly. Specify the target assembly name in the Assembly name box.