您可以预编译并合并 ASP.NET 网站的一部分,然后继续开发吗?
网站的很大一部分是预编译和合并的,因为它几乎永远不会改变。 如果更新原始版本,可以替换预编译位。 我想继续开发新页面,但是当我浏览到新页面时出现以下错误:
文件“/Website/Test/Default.aspx” 尚未预编译,无法 应要求。
有没有办法解决?
编辑:
如果我删除 precompileApp.config 文件,当我浏览标记文件时,我会得到它们的内容:
这是预编译工具生成的标记文件,不能删除!
A big part of the web site is precompiled and merged, since it's almost never going to change. The precompiled bits can be replaced in case of updates to the original. I want to continue development of new pages, but when I browse to a new page I get the following error:
The file '/Website/Test/Default.aspx'
has not been pre-compiled, and cannot
be requested.
Is there any way around this?
Edit:
If I remove the precompileApp.config file I get the contents of the marker files when I browse them:
This is a marker file generated by the precompilation tool, and should not be deleted!
您是否看过带有可更新 UI 选项的预编译? 这会将所有源代码和资源编译到 DLL 中,但允许您在部署后继续对 .aspx 页面进行更改。
另一种选择可能是在服务器上预编译网站,而不是预编译然后将其部署到网络服务器。
这篇 MSDN 文章中讨论了这两个选项:
http://msdn.microsoft.com /en-us/library/bb398860.aspx
Have you looked at the precompile with updatable UI option? This compiles all the source code and resources into a DLL but allows you to continue making changes to your .aspx pages after deployment.
Another option could be to precompile the website in place on the server instead of precompiling it then deploying it to the webserver.
Both options are addressed in this MSDN article:
http://msdn.microsoft.com/en-us/library/bb398860.aspx