Search code examples
asp.netvb.netmaster-pagesbuild-process

Masterpage markup file not present in successful Build output


So I have an older VB.NET Web Application that probably began life using ASP.NET v2 and has now been fully upgraded to v4 of the framework. Somewhere along the way, during the build step, the masterpage file's markup page (the "*.master" file) stopped being produced by the builds (which were local Visual Studio builds). We did not notice when the bug started because our deployment step didn't remove the old version of that file on the destination server until recently.

The local builds worked correctly, and continue to do so, and we also tried building with the TFS Build server, which performs the same way. In both builds, the build reports back as perfectly normal and successful, its just that the file is simply missing from the output.

Comparing the the application's "Compile" settings (under the proj Properties) to other VB.NET apps in the same Solution yields nothing that stands out as unusual. The proj output path is "bin\", Target CPU is "AnyCPU", etc etc. Doing a Debug or Release local build also does not change the fact that the master page markup file is missing. The namespace listed in the master page markup in the "Inherits" attribute on the <%@ Master %> tag seems correct as well.

Does anyone have any experience with this kind of missing file build issue?


Solution

  • Normally the *.master file type has a build action of "Content." If the build action is set to "None" you will likely not see this file in your build output.

    Check the build action parameter by right-clicking the master page file from Solution Explorer, click Properties from the context menu. Then, in the Properties pane, see Build Action in the Advanced section.

    Properties Pane in Visual Studio 2015

    I hope this helps.