After exploring the Precompilation for Deployment section, I want to improve the build process. Now I do:
- prepare the website using Web One Click Publish, for example, to a directory
c:\www\app, and this directory is available in IIS through the application ( localhost/app) - I run
aspnet_compiler.exe -v app c:\www\appprecompiled -f
Now I have a ready-made precompiled application in c:\www\appprecompiled, and everything is in order. However, my application is quite large, and publishing it (step 1) takes about 5 minutes from scratch. Therefore, I wonder if it is possible to avoid the first step and perform step 2 (pre-compilation) with the source folder pointing to the solution folder. I tried something like this:
aspnet_compiler.exe -v codeapp c:\code\app -f
Where c:\code\appis a folder with web.config files, etc., basically it is a project with a website, and this folder is accessible through http://localhost/codeapp.
But when I run this command, I get errors about missing global.asax or web.config errors:
C: \ code \ application \ OBJ \ Debug \ package \ packagetmp \ web.config (18): Error ASPCONFIG: error in using the section registered as allowDefinition = 'MachineToApplication' above the application level. This error may be caused by a virtual directory not configured as an application in IIS.
And for the record, I use Application, not Virtual Directory.
So, is there a way to precompile in a simple website folder?
source
share