Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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.

XML
<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>



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.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900