Forum Themes:
Welcome !

 Precompiling the website for deployment

Author Message
Samuel

  • Total Posts : 11784
  • Reward points : 167750
  • Joined: May 23 '01
  • Status: offline
Precompiling the website for deployment Wed. Apr 22, '09 12:52 PM (permalink)

Note: this article no longer applies for version 3.9 or later.

 
If you'd like to precompile the forum for deployment, here is a trick you need to follow as you will run into a bug in Visual Studio's publish website feature.

The compilation error only occurs some of the time
and it is not a bug in the software.

The error will be something like the following:
H:\forum\App_Templates\Classic\Regular.master(1): Build (web): Circular file references are not allowed.


Solution

First, please disable any AntiVirus software that is running on the machine. Kaspersky for one is known to block compilation and it is best to disable it during the compilation process.
 
Second, simply try compiling again, and the error will usually disappear.

If not, please follow the instruction:
 
Open ~/App_Templates/Theme_Name/Regular.master

In the Master Directive, delete the MasterPageFile attribute so that it reads:
<%@ Master Language="VB" CodeFile="Regular.master.vb" Inherits="App_Masters_Classic_Regular" %>

Then, when you publish the website, make sure you have "Allow this precompiled site to be updatable" checked, as we will need to put the MasterPageFile attribute back in later.



Publish the site, and when it finishes,

Open ~/App_Templates/Theme_Name/Regular.master in the Target Location (where you published the compiled site to)

You should see something like this in the first line:

<%@ master language="VB" inherits="App_Masters_Classic_Regular, App_Web__lnfy072" %>


Put the MasterPageFile attribute back in, so that it reads:

<%@ master language="VB" inherits="App_Masters_Classic_Regular, App_Web__lnfy072" MasterPageFile="~/MasterPage.master" %>


Do the above every time you compile the software, and it should work without any problem.


<message edited by Samuel on Fri. Jul 8, '11 3:59 PM>
Attached Image(s)
ASPPlayground.NET
~ see our Version 4 plans here

 
#1
    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.9