We get several assemblies (start with App_*) rather than a single assemblies in bin\ folder in ASP.Net Precompiledweb compilation mode.
Website Compilation in .Net Framework 2.0 with MSBuild Script in this post I wrote how to compile the website through MSBuild script.

Now following commandline shiped with Visual Studio 2005 Web Deployment Projects (Beta Preview), which helps us to merge all the assemblies in a single assembly.

Add following “merge_exe_path” Property in PropertyGroup and Target “Merge” in the script I posted earlier, and call the Target in Main Task.

<Project DefaultTargets="Main" xmlns="http://schemas.microsoft.com/developer/msbuild/2003
">
  <PropertyGroup>
  <merge_exe_path>C:\Progra~1\MSBuild\Microsoft\WebDeployment\v8.0\aspnet_merge.exe</merge_exe_path> 
  <PrecompiledAssembliesPath>D:\Output\</PrecompiledAssembliesPath>
  </PropertyGroup>
  <Target Name="Main">
    <AspNetCompiler
   VirtualPath="/TEST"
   PhysicalPath="D:\Projects\Works\Test\"
   TargetPath="$(PrecompiledAssembliesPath)"
   Force="true"
   Debug="true"
   Updateable="true"
        />
    <CallTarget Targets="Merge"/>
  </Target>
  <Target Name="Merge">
    <Exec Command="$(merge_exe_path) -copyattrs -o CSnVB.dll $(PrecompiledAssembliesPath)" />
  </Target>
</Project>

> merge_exe_path is the fullpath of aspnet_merge.exe
> PrecompiledAssembliesPath is the path of the output folder where \Bin folder resides and not the path of bin folder.

 

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Feedback

No comments posted yet.


Post a comment





 

 

News

Employers
Soppa Group India
iSmart Panache Inc
R Systems Internationals Ltd
Technovate eSolutions Pvt Ltd
The contents of this blog are my personal opinion and do not represent in any way the view of my employer.
These postings are provided "AS IS" with no warranties, and confer no rights.

Google PR™ - Post your Page Rank with MyGooglePageRank.com

Archives

Post Categories

Image Galleries

Articles & Magazines

ASP.Net 2.0 Compilation

ASP.Net, Blogs I refer...

Atlas

Dost

Drivers and Software Download

Garhwal

Travel Domain

WSS and WebParts

Syndication: