asp.net - Precompilation for Deployment -
after exploring precompilation deployment topic want enhance build process. now, is:
- prepare web site using web 1 click publish, instance
c:\www\app
directory, , directory available in iis via app (localhost/app
) - i launch
aspnet_compiler.exe -v app c:\www\appprecompiled -f
now have ready precompiled application in c:\www\appprecompiled
, fine. application quite big, , publishing (step 1) take 5 minutes scratch. wonder if possible avoid step 1 , , perform step 2 (precompilation) source folder pointing solution folder. tried this:
aspnet_compiler.exe -v codeapp c:\code\app -f
where c:\code\app
folder web.config etc files, it's project web site , folder avaliable via http://localhost/codeapp
.
but when launching command, errors missing global.asax or web.config errors:
c:\code\app\obj\debug\package\packagetmp\web.config(18): error aspconfig: error use section registered allowdefinition='machinetoapplication' beyond application level. error can caused virtual directory not being configured application in iis.
and record, use application, not virtual directory.
so there way perform precompilation on plain web site folder?
i used
aspnet_compiler -p physicalorrelativepath -v / targetpath
from http://msdn.microsoft.com/en-us/library/ms227976(v=vs.80).aspx , removed obj folder prior executing it, , precompilation works :)
Comments
Post a Comment