[Mono-list] Compilation errors
Madars Vitolins
madars.vitolins at gmail.com
Sun Aug 26 04:44:29 EDT 2007
Hi Azher,
I guess you are using VS2005 to generate create these asp.net applications?
If so, then there is two modes in VS:
1. Asp.NET Web Application
Here Studio generates for each page additional *.aspx.designer.cs file -
where control definitions is kept of partial class.
So I guess you should use this kind of Web project!
2. Asp.NET Web site
Control definitions is kept only in aspx files. With some old versions of
mono I wasn't able to compile such kind web project under mono (mono didn't
lookup definitions in aspx files).
You could read about this more in
http://msdn2.microsoft.com/en-us/library/aa730880(vs.80).aspx
Madars.
On 8/26/07, Azher Amin <azher at niit.edu.pk> wrote:
>
> Hi Robert,
>
> Thnx for replying. I am just new to mono and wanted to run the code in
> apache .... don't know how .net2 will run ... but i have this
> application. I tried gmcs but then i got the errors ... but again do i
> need something else on the server to run .net2 ... i have already
> enabled following httpd.conf
>
> MonoServerPath default /usr/mono-1.2.4/bin/mod-mono-server2
>
> so plz suggest where to start.
>
> Regards
> -Azher
>
>
> Actual Login.asp is:
>
> <%@ Page Language="C#" MasterPageFile="~/MasterPage.master"
> AutoEventWireup="true"
> CodeFile="Login.aspx.cs" Inherits="Login" Theme = "ThemeDesign"
> Title="Southern Tree - Financial Management" %>
>
> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
> runat="Server">
>
> <form id="form1" runat="server" >
> <asp:Login ID="Login1" runat="server" TitleText="My Account"
> DestinationPageUrl="~/WebPages/Client/MainPage.aspx" LoginButton
> Text="log in" OnLoggedIn="Login1_LoggedIn">
> <CheckBoxStyle ForeColor="Black" Font-Size="Small" Font-Bold="True" />
> <LabelStyle ForeColor="Black" Font-Size="Small" Font-Bold="True" />
> <LoginButtonStyle BackColor="#FF7721" BorderStyle="Outset"
> BorderWidth="3px" Font-Bold="True"
> Font-Size="Small" ForeColor="White" />
> <FailureTextStyle Font-Size="Small" Font-Bold="True" />
> <TitleTextStyle Font-Bold="True" ForeColor="#FF7721" />
> </asp:Login>
>
> </form>
>
> </asp:Content>
>
>
>
> # gmcs -r:System.Web -r:System.Data Login.aspx.cs
> Login.aspx.cs(17,23): error CS0103: The name `Login1' does not exist in
> the context of `Login'
> Login.aspx.cs(22,55): error CS0103: The name `Login1' does not exist in
> the context of `Login'
> Login.aspx.cs(27,83): error CS0103: The name `ConfigurationManager' does
> not exist in the context of `Login'
> Login.aspx.cs(40,26): warning CS0168: The variable `ex' is declared but
> never used
> Compilation failed: 3 error(s), 1 warnings
>
>
>
>
>
>
> Robert Jordan wrote:
> > Azher Amin wrote:
> >
> >> Hi,
> >>
> >> I am getting this error while compiling the below code. I would be
> >> grateful if someone suggest on how to resolve the problem.
> >>
> >> Error:
> >>
> >> Login.aspx.cs(17,9): error CS0117: `System.Web.UI.Page' does not
> contain
> >> a definition for `SetFocus'
> >> Login.aspx.cs(22,9): error CS0246: The type or namespace name
> >> `MembershipUser' could not be found. Are you missing a using directive
> >> or an assembly reference?
> >> Compilation failed: 2 error(s), 0 warnings
> >>
> >>
> >> mcs -r:System.Web.dll -r:System.Data Login.aspx.cs
> >>
> >
> > You want to use "gmcs" for .NET 2.0 code.
> >
> > Robert
> >
> > _______________________________________________
> > Mono-list maillist - Mono-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> >
> >
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20070826/a7733adf/attachment.html
More information about the Mono-list
mailing list