Bug 18961 - compile Masterpage's masterpage
Summary: compile Masterpage's masterpage
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web (show other bugs)
Version: 2.10.x
Hardware: Other Linux
: Low normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-04-11 16:03 UTC by Chris barr
Modified: 2014-04-16 15:19 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Chris barr 2014-04-11 16:03:15 UTC
Description of Problem:
Compiler does not compile master page's master.

Steps to reproduce the problem:
_uiMaster.master_ 
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="uiMaster.master.cs" CompilationMode="Always" Inherits="masters_uiMaster" %> 
<html>
<body>
Hay! I'm the site main nav! :D 
<asp:ContentPlaceHolder id="bodyContent" runat="server"></asp:ContentPlaceHolder>
</body>
</html>

_cmsMaster.master_ 
<%@ Master Language="C#" MasterPageFile="~/masters/uiMaster.master" AutoEventWireup="true" CodeFile="cmsMaster.master.cs" Inherits="masters_cmsMaster" %> 
<asp:Content ID="body" ContentPlaceHolderID="bodyContent" Runat="Server">
HAY! I'm the site's content that's managed via a Content Management System. 
</asp:Content>

_cmsMaster.master.cs_ 
((masters_uiMaster)Master).someGlobalSetting = value; //possibly enabling an edit icon or passing the session up to the top. 

_index.aspx_ 
<%@ Page Title="" Language="C#" MasterPageFile="~/masters/cmsMaster.master" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" %> 

Actual Results:
Server Error in '/' Application 

Compilation Error 

Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error. 

Compiler Error Message: CS0246: The type or namespace name `uiMaster' could not be found. Are you missing a using directive or an assembly reference? 

Source Error: 

Line 108:         set 
Line 109:         { 
Line 110:             ((uiMaster)Master).session = value; 
Line 111:             session = value; 
Line 112:         } 

Source File: <site path>/masters/cmsMaster.master.cs  Line: 110 


Show Detailed Compiler Output: 

gmcs /target:library /lib:"<site path>/Bin" /debug+ /optimize- /warn:4 /out:"/tmp/www-data-temp-aspnet-0/16aeb545/App_Web_cmsMaster.master.fbcfebdd.56d3bce3.dll" /r:"/usr/lib/mono/gac/System/2.0.0.0__b77a5c561934e089/System.dll" /r:"/usr/lib/mono/gac/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll" /r:"/usr/lib/mono/gac/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll" /r:"/usr/lib/mono/gac/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll" /r:"/usr/lib/mono/gac/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll" /r:"/usr/lib/mono/gac/System.Web.Services/2.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll" /r:"/usr/lib/mono/gac/System.Runtime.Serialization/3.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll" /r:"/usr/lib/mono/gac/System.IdentityModel/3.0.0.0__b77a5c561934e089/System.IdentityModel.dll" /r:"/usr/lib/mono/gac/System.ServiceModel/3.0.0.0__b77a5c561934e089/System.ServiceModel.dll" /r:"/usr/lib/mono/gac/System.ServiceModel.Web/3.5.0.0__31bf3856ad364e35/System.ServiceModel.Web.dll" /r:"/usr/lib/mono/gac/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll" /r:"/var/www/nabor_site/Bin/mysql.web.dll" /r:"/var/www/nabor_site/Bin/mysql.data.dll" /r:"/var/www/nabor_site/Bin/mysql.data.entity.dll" /r:"/usr/lib/mono/gac/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll" /r:"/usr/lib/mono/gac/System.Web.Extensions/3.5.0.0__31bf3856ad364e35/System.Web.Extensions.dll" /r:"/usr/lib/mono/gac/System.Xml.Linq/3.5.0.0__b77a5c561934e089/System.Xml.Linq.dll" /r:"/usr/lib/mono/gac/System.Data.DataSetExtensions/3.5.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll" /r:"/tmp/www-data-temp-aspnet-0/16aeb545/App_Code.2dea60b1.dll" /r:"/var/www/nabor_site/Bin/AWSSDK.dll" /r:"/var/www/nabor_site/Bin/mysql.visualstudio.dll" /r:"/var/www/nabor_site/Bin/pdfcrowd.dll" /r:"/tmp/www-data-temp-aspnet-0/16aeb545/App_global.asax_61f60619.dll"  /nowarn:0169 /d:DEBUG  -- "/tmp/www-data-temp-aspnet-0/16aeb545/App_Web_cmsMaster.master.fbcfebdd.56d3bce3_0.cs" "/tmp/www-data-temp-aspnet-0/16aeb545/App_Web_cmsMaster.master.fbcfebdd.56d3bce3_1.cs" 

<site path>/masters/cmsMaster.master.cs(110,15): error CS0246: The type or namespace name `masters_uiMaster' could not be found. Are you missing a using directive or an assembly reference? 

Show Complete Compilation Source: 

Line 1: using System; 
Line 2: using System.Collections.Generic; 
Line 3: using System.Linq; 
Line 4: using System.Web; 
Line 5: using System.Web.UI; 
Line 6: using System.Web.UI.WebControls; 
Line 7: using <company NS>; 
Line 8: 
Line 9: public partial class masters_cmsMaster : System.Web.UI.MasterPage 
Line 10: { 
Line 11:     //var 
Line 12:     sessionManagement session = null; 
Line 13:     managedContent content = null; 
Line 14:     documentManager documents = null; 
Line 15:     //var 
Line 16: 
Line 17:     protected void Page_Load(object sender, EventArgs e) 
Line 18:     { 
<Lines Removed>
Line 69:     } 
Line 70: 
<Lines Removed>
Line 105: 
Line 106:     public sessionManagement managedSession 
Line 107:     { 
Line 108:         set 
Line 109:         { 
Line 110:             ((masters_uiMaster)Master).session = value; 
Line 111:             session = value; 
Line 112:         } 
Line 113:     } 
<Lines Removed>
Line 122: } 
Version information: Mono Runtime Version: 2.10.8.1 (Debian 2.10.8.1-1ubuntu2.2); ASP.NET Version: 2.0.50727.1433

Expected Results:
The index.aspx, cmsMaster.aspx, AND uiMaster.aspx to all compile when index.aspx is requested from the browser as it does for Windows.

How often does this happen? 
100% of the time.

Additional Information:
If there is a page that directly accesses uiMaster and compiles it then index -> cmsMaster can use the pre-compiled page.
Comment 1 Chris barr 2014-04-16 15:04:14 UTC
Low priority?
Then I need a workaround until this bug gets worked on because our new application is launching soon and this has a 100% error rate and the application will not run because of it.
Can anything be done at all or work around this bug?
Comment 2 Miguel de Icaza [MSFT] 2014-04-16 15:19:43 UTC
The priority is a field for internal Xamarin use that reflect's our team's priority.

Since we do not do anything on the web, it is low for us.   But we kept the severity to normal, in case someone wants to do anything about it.

Xamarin does not do anything with ASP.NET.

Note You need to log in before you can comment on or make changes to this bug.