`
pleasetojava
  • 浏览: 704289 次
  • 性别: Icon_minigender_2
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

aspnet_compiler

阅读更多
aspnet_compiler 是一个把整个网站进行编译的工具。


C:WINNTMicrosoft.NETFramework2.0.40607>aspnet_compiler-?
UtilitytoprecompileanASP.NETapplication
Copyright(c)MicrosoftCorporation
2001-2003.Allrightsreserved.

Usage:
aspnet_compiler
[-?][-mmetabasePath|-vvirtualPath[-pphysicalDir]]
[targetDir]
-?Printsthishelptext.
-mThefullIISmetabasepathoftheapplication.Thisswitchcannot
becombinedwiththe-vor-pswitches.
-vThevirtualpathoftheapplicationtobecompiled(e.g.
"/MyApp").If-pisspecified,thephysicalpathisusedtolocate
theapplication.Otherwise
,theIISmetabaseisused,andthe
applicationisassumedtobeinthedefaultsite(under
"/LM/W3SVC/1/Root").Thisswitchcannotbecombinedwiththe-m
switch.
-pThephysicalpathoftheapplicationtobecompiled.If-pis
missing
,theIISmetabaseisusedtolocatetheapp.
-nologoSuppresscompilercopyrightmessage.
targetDirThephysicalpathtowhichtheapplicationiscompiled.Ifnot
specified
,theapplicationisprecompiledin-place.

Examples:

Thefollowingtwocommandsareequivalent
,andrelyontheIISmetabase.The
compiledapplicationisdeployedtoc:MyTarget:
aspnet_compiler-m/LM/W3SVC/
1/Root/MyAppc:MyTarget
aspnet_compiler-v/MyAppc:MyTarget

Thefollowingcommandcompilestheapplication/MyAppin-place.Theeffectis
thatnomorecompilationswillbeneededwhenHTTPrequestsaresenttoit:
aspnet_compiler-v/MyApp

Thefollowingcommanddoes*not*relyontheIISmetabase
,asitexplicitly
specifiesthephysicalsourcedirectoryoftheapplication:
aspnet_compiler-v/MyApp-pc:myappc:MyTarget


运行C:\WINNT\Microsoft.NET\Framework\v2.0.40607>aspnet_compiler -v /djlp1 -p H:\Websites\DljPortal c:\dljp1 之后,

在 c:\dljp1 生成了一个目录,里面有 bin 目录,有data目录,还有其他文件都复制了过去了。

bin目录下多了几个dll文件:__code7jyhe1in.dll __DljPortalltzbmqxr.dll __resources9y3reyon.dll default.aspx.cdcab7d2.compiled global.asax.compiled global.asax7xyenj3t.dll ...

而以前的 default.aspx 现在的内容变成:This is a marker file generated by the precompilation tool, and should not be deleted!

不过这个 c:\dljp1 是不会自动变成 http://localhost/dljp1的。这还要自己去添加。

web.config 里的信息没有变。 不过这次 codeSubDirectories/<add directoryname="DljPortal"> 这个设置没有提示错误了。。</add>

最难得的是global.asax已经失踪了,这个文件将在bin目录下用global.asax.compiled来指定。内容是:


<preserveresultType="3"virtualPath="/djlp1/global.asax"hash="fffffffac7751c8c"
filehash
="ffffd6a40be55434"assembly="global.asaxx5e9jbd0"type="ASP.Global_asax">
<filedeps>
<filedepname="/djlp1/global.asax"/>
</filedeps>
</preserve>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics