从主页面继承的Aspx页面未进行预编译 [英] Aspx pages inheriting from a master page not getting precompiled

查看:77
本文介绍了从主页面继承的Aspx页面未进行预编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Web Publish发布ASP.NET MVC Web应用程序(.net 4.5)。我的发布配置文件(.pubxml文件)如下所示。



I am trying to publish a ASP.NET MVC web application (.net 4.5) using Web Publish. My publish profile (.pubxml file) looks as below.

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <WebPublishMethod>FileSystem</WebPublishMethod>
    <SiteUrlToLaunchAfterPublish />
    <publishUrl>E:\DeployTest</publishUrl>
    <DeleteExistingFiles>True</DeleteExistingFiles>
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
    <ExcludeApp_Data>False</ExcludeApp_Data>
    <PrecompileBeforePublish>True</PrecompileBeforePublish>
    <EnableUpdateable>False</EnableUpdateable>
    <DebugSymbols>False</DebugSymbols>
    <WDPMergeOption>MergeAllOutputsToASingleAssembly</WDPMergeOption>
    <UseMerge>True</UseMerge>
    <SingleAssemblyName>MyWebApp.Precompiled</SingleAssemblyName>
  </PropertyGroup>
</Project>







问题在于第一个时间我出版的时候;当我的'obj'文件夹为空时...没有任何cshtml文件,也没有从母版页继承的aspx文件被预编译。 (即对于此类文件,在bin文件夹中不会生成类似* .6743f9a3.compiled的编译版本。)虽然主页面本身的.compile文件和任何其他不从母版页继承的aspx / ascx文件都会生成。应该注意的是bin文件夹之外的一切都是预期的..所有aspx / ascx文件都转换为符号空标记文件。



现在如果我再次尝试发布,生成所有aspx页面的.compile文件。但如果我要删除obj文件夹并执行发布,我将再次遇到同样的问题。



寻找任何建议/指导。




The problem is that for the very first time when I publish; when my 'obj' folder is empty.. none of the cshtml files and none of the aspx files that inherit from the master page get precompiled. (i.e. for such files, the compiled versions like *.6743f9a3.compiled are not generated in the bin folder.) Although the .compile files for master page itself and any other aspx/ ascx file that does not inherit from the master page get generated. It should be noted that outside the bin folder everything is as expected.. All aspx/ ascx files get converted to symbolic empty marker files.

Now if I attempt publish again, .compile files for all aspx pages get generated. But if I were to delete the obj folder and perform publish, I will again get the same issue.

Looking for any suggestions/ guidance.

推荐答案

这篇关于从主页面继承的Aspx页面未进行预编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆