Merge all outputs to a single assembly
This is equivalent to what we do in visual studio
2003.
Treat as library component
Removes the App_code.compiled file. This 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.
Merge each folder output to its own assembly
This property makes the compiler to output one assembly
per folder.
Merge all pages and controls to a single assembly
This gives one assembly for all ASCX and ASPX in the
project and App_Code files will be outputted as a separate assembly.
Version Output Assemblies
As name suggests it is used to provide assembly
versions.
Signing Page
This page contains attribute to sign the assembly with
key file generated with sn.exe. This is not most commonly used setting in the
projects.
Deployment Page
The Page will look like,
![](/Articles/ArticleFiles/IMG/126/image007.jpg)
Enable Web.config file section replacement
To make a replacement of a particular section in
Web.Config during build we can use this option. This section that should be
replaced can be in separate file and can contain multiple section names that are
separated by semicolon. The Syntax is, sectionName=filename. Note that section
names are case sensitive and files can only contain relevant sections.
Example:
appSettings=appsettings.config
What happen when we install Web Deployment Plug-in?
Installing this plug-in will install a utility called
aspnet_merge.exe in the location C:\Program
Files\MSBuild\Microsoft\WebDeployment\v8.0 by default. This is the utility that
is doing all the above actions for us. We don’t want Visual studio to be
installed also to use this utility because it supports command line build
also.
Web Deployment plug-in for Visual Studio 2008
All these features are also applicable for Visual Studio
2008 Web Deployment plug-in.
Below, you can find a quick list of WDP 2008
features.
Ø
Migration from WDP for VS 2005 to WDP for VS 2008.
Ø
Replacing WDP output only if Pre-Compilation succeeds.
Ø
Creating IIS Applications.
Ø
Using aspnet_merge.exe version which is installed with Visual
Studio 2008.
Ø
Core WDP Features.
Visit here
to read more about these features.
Common Error and Resolution
Aspnet_merge.exe exited with code 1.
This error will occur when we have same class name for 2
classes in the project.
![](/Articles/ArticleFiles/IMG/126/image008.jpg)
The output given by the compiler is below.
Validation Complete
------ Build started: Project: babutest_deploy,
Configuration: Debug Any CPU ------
C:\Program
Files\MSBuild\Microsoft\WebDeployment\v8.0\Microsoft.WebDeployment.targets(574,9):
error MSB6006: "aspnet_merge.exe" exited with code 1.
Done building project "babutest_deploy.wdproj" --
FAILED.
========== Build: 1 succeeded or up-to-date, 1 failed, 0
skipped ==========
The above output does not show a detailed output about
what and where the actual error occurred. So, to get the detailed output of what
and where the error happened,
Click Tools>Options>
It will open a window like,
![](/Articles/ArticleFiles/IMG/126/image009.jpg)
Check “Show All settings” checkbox to get the full
listing of Options. Click Project and Solutions>Build and Run> Select
“Diagnostic” of “MSBuild project build output verbosity” dropdown and click
OK.
When we build the deployment project again, we can get
the full description of the error. I have bolded the class name that is
duplicated in the below error description.
Command:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe -v /babutest
-p F:\Articles\babutest -u -f -d "C:\Documents and Settings\Satheesh\My
Documents\Visual Studio 2005\Projects\babutest\babutest_deploy\Debug\\"
The "AspNetCompiler" task is using
"aspnet_compiler.exe" from
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe".
Utility to precompile an ASP.NET application
Copyright (C) Microsoft Corporation. All rights
reserved.
Done executing task "AspNetCompiler".
Task "ToggleDebugCompilation"
Updateing web.config compilation debug = 'True' ...
Successfully updated web.config compilation debug =
'True' ...
Done executing task "ToggleDebugCompilation".
Task "RemoveDir" skipped, due to false condition;
('$(DeleteAppDataFolder)' == 'true') was evaluated as ('' == 'true').
Command:
C:\Program
Files\MSBuild\Microsoft\WebDeployment\v8.0\aspnet_merge.exe "C:\Documents and
Settings\Satheesh\My Documents\Visual Studio
2005\Projects\babutest\babutest_deploy\Debug" -o babutest_deploy -debug
-copyattrs
The "AspNetMerge" task is using "aspnet_merge.exe" from
"C:\Program Files\MSBuild\Microsoft\WebDeployment\v8.0\aspnet_merge.exe".
Utility to merge precompiled ASP.NET assemblies.
Copyright (c) Microsoft Corporation. All rights
reserved.
An error occurred when merging assemblies:
ILMerge.Merge: ERROR!!: Duplicate type '_Default' found in assembly
'App_Web_epckofnt'.
C:\Program
Files\MSBuild\Microsoft\WebDeployment\v8.0\Microsoft.WebDeployment.targets(574,9):
error MSB6006: "aspnet_merge.exe" exited with code 1.
Done executing task "AspNetMerge" -- FAILED.
Done building target "AspNetMerge" in project
"babutest_deploy.wdproj" -- FAILED.
Done building project "babutest_deploy.wdproj" --
FAILED.
Build FAILED.
Time Elapsed 00:00:03.87
========== Build: 1 succeeded or up-to-date, 1 failed, 0
skipped ==========
The information’s that are bolded in the error
information will give us a clue to find the error! For Deploying asp.net
application in Windows 2003 Server, read my article on Deploying
Application in Asp.Net.
|