ok gang, I am almost ready to give up on the BeerHouse book... I have started from the beginning 3 times now and I cannot clear the errors that the code produces. I have downloaded the sample site and everything works fine but when I try to create the site
with the book, something is missing. I have tried with both VS2005 Standard and VWD2008 Express and I run in to the same problem. I am just in the beginning and I am trying to run the project to try and switch between the two themes. Below is the Compilation
error that I receive:
Compiler Error Message: The compiler failed with error code 1.
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mybeerhouse\e824566a\410448d7\App_Code.un-b_7ja.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mybeerhouse\e824566a\410448d7\App_Web_themeselector.ascx.cc671b29.akvlsqza.dll" /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701 "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mybeerhouse\e824566a\410448d7\App_Web_themeselector.ascx.cc671b29.akvlsqza.0.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mybeerhouse\e824566a\410448d7\App_Web_themeselector.ascx.cc671b29.akvlsqza.1.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mybeerhouse\e824566a\410448d7\App_Web_themeselector.ascx.cc671b29.akvlsqza.2.cs"
Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.1433
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
c:\WebDocs\myBeerHouse\Controls\ThemeSelector.ascx.cs(912305,33): error CS0115: 'ASP.controls_themeselector_ascx.FrameworkInitialize()': no suitable method found to override
</div>
<script type=text/javascript> function OnToggleTOCLevel1(level2ID) { var elemLevel2 = document.getElementById(level2ID); if (elemLevel2.style.display == 'none') { elemLevel2.style.display = ''; } else { elemLevel2.style.display = 'none'; } } </script>
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
Well, I managed to get all the errors cleared and I got the site to run. Not everything is functioning as it should be at least there is progress. I think the author has left out a few steps in his code...
If you are assuming that this is a "step-by-step" book, you'd be mistaken.
You are right -- the author skips a LOT of steps. That's on purpose.
The author assumes you will examine the downloaded code, and the book then briefly explains the more complex classes and some of the interesting methods, and steps you through a few of the trickier parts only. The parts that are examined in detail are, for
the most part, the new functionality that was introduced in ASP,NET 2.0. Therefore, you won't be able to re-create the code by using the book alone, as most of the non-2.0 legacy code isn't detailed in the book.
I ran into this today and the problem you are experiencing is identified here: 'ASP.controls_themeselector_ascx.FrameworkInitialize()': no suitable method found to override - it is the last line in the details of the error.
when you create the themeselector control class (themeselector.ascx.cs), it will be named Controls_ThemeSelector which conflicts the directive in your themeselector.ascx file.
rename the themeselector class to ThemeSelector sans the Controls_ and replace the inherits with
Inherits="MB.TheBeerHouse.UI.Controls.ThemeSelector" on your themeselector.ascx file
dkirk
Member
518 Points
314 Posts
What am I missing?
May 02, 2008 01:44 AM|LINK
ok gang, I am almost ready to give up on the BeerHouse book... I have started from the beginning 3 times now and I cannot clear the errors that the code produces. I have downloaded the sample site and everything works fine but when I try to create the site with the book, something is missing. I have tried with both VS2005 Standard and VWD2008 Express and I run in to the same problem. I am just in the beginning and I am trying to run the project to try and switch between the two themes. Below is the Compilation error that I receive:
Compiler Error Message: The compiler failed with error code 1.
<div class=expandable onclick="OnToggleTOCLevel1('compilerOutputDiv')">Show Detailed Compiler Output:</div> <div id=compilerOutputDiv><script type=text/javascript> function OnToggleTOCLevel1(level2ID) { var elemLevel2 = document.getElementById(level2ID); if (elemLevel2.style.display == 'none') { elemLevel2.style.display = ''; } else { elemLevel2.style.display = 'none'; } } </script>
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
Any help would be greatly appreciated...
dkirk
Member
518 Points
314 Posts
Re: What am I missing?
May 02, 2008 12:14 PM|LINK
Well, I managed to get all the errors cleared and I got the site to run. Not everything is functioning as it should be at least there is progress. I think the author has left out a few steps in his code...
Lee Dumond
Contributor
6404 Points
1173 Posts
Re: What am I missing?
May 02, 2008 03:02 PM|LINK
If you are assuming that this is a "step-by-step" book, you'd be mistaken.
You are right -- the author skips a LOT of steps. That's on purpose.
The author assumes you will examine the downloaded code, and the book then briefly explains the more complex classes and some of the interesting methods, and steps you through a few of the trickier parts only. The parts that are examined in detail are, for the most part, the new functionality that was introduced in ASP,NET 2.0. Therefore, you won't be able to re-create the code by using the book alone, as most of the non-2.0 legacy code isn't detailed in the book.
Follow Me on Twitter
Wyerarch
Participant
1825 Points
426 Posts
Re: What am I missing?
May 22, 2008 09:40 AM|LINK
Can you please tell me how you solved the error? I have exactly the same one, and it is driving me mad!
http://wyerarch.blogspot.com
dkirk
Member
518 Points
314 Posts
Re: What am I missing?
May 22, 2008 12:00 PM|LINK
Hello Wyearch,
In the page directive of the Default.aspx, make sure that you inherit the MB.TheBeerHouse.UI namespace. See code below
aspx page:
<%
@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="MB.TheBeerHouse.UI._Default" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="RightContent" Runat="Server"></
asp:Content><
asp:Content ID="MainContent" runat="server" ContentPlaceHolderID="MainContent"> <asp:Image ID="imgBeers" runat="server" ImageUrl="~/Images/3beers.jpg" ImageAlign="left" hspace="8" />Lorem ipsum dolor sit amet, consectetuer adipiscing elit...
</asp:Content><
asp:Content ID="Content3" ContentPlaceHolderID="LeftContent" Runat="Server"></
asp:Content>code behind:
using
System;using
System.Data;using
System.Configuration;using
System.Collections;using
System.Web;using
System.Web.Security;using
System.Web.UI;using
System.Web.UI.WebControls;using
System.Web.UI.WebControls.WebParts;using
System.Web.UI.HtmlControls; namespace MB.TheBeerHouse.UI{
public partial class _Default : BasePage{
protected void Page_Load(object sender, EventArgs e){
}
}
}
damole
Member
4 Points
2 Posts
Re: What am I missing?
Jun 11, 2009 10:11 PM|LINK
I ran into this today and the problem you are experiencing is identified here: 'ASP.controls_themeselector_ascx.FrameworkInitialize()': no suitable method found to override - it is the last line in the details of the error.
when you create the themeselector control class (themeselector.ascx.cs), it will be named Controls_ThemeSelector which conflicts the directive in your themeselector.ascx file.
rename the themeselector class to ThemeSelector sans the Controls_ and replace the inherits with Inherits="MB.TheBeerHouse.UI.Controls.ThemeSelector" on your themeselector.ascx file