Is there an equivalent to MvcBuildViews for webforms?
I开发者_JS百科s there an equivalent to MvcBuildViews for webforms?
no.
An alternative is to add a postbuild action to the visual studio project and have it run the aspnet_compiler.exe to "compile an application in place".
Compiling an Application in Place
The ASP.NET Compilation tool can compile an application in place, that is, it mimics the behavior of making multiple requests to the application, thus causing regular compilation. Users of a precompiled site will not experience a delay caused by compiling the page on first request.
Note that if you are using an impersonated account, both the account and the logon user account must have write access to the target for precompilation to succeed.
When you precompile a site in place, the following items apply:
The site retains its files and directory structure.
You must have compilers for all programming languages used by the site on the server.
If any file fails compilation, the entire site fails compilation.
You can also recompile an application in place after adding new source files to it. The tool compiles only the new or changed files unless you include the -c option.
精彩评论