[mono-vb] ASP.NET compilation of VB.NET
Jochen Wezel
jwezel@compumaster.de
Thu, 12 Aug 2004 12:36:34 +0200
This is a multi-part message in MIME format.
------_=_NextPart_001_01C48058.3D67AB83
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi!
I've just tried to compile a sample page in VB.NET by the ASP.NET =
engine.
I only had to comment some lines (here in bold letters) to work around =
the current compile errors of VB.NET in Mono 1.0.1.
I'm currently not able to download current CVS, that's why I post it =
here and hope, somebody takes an eye on. Maybe, it's already fixed, =
too...
[root@lwezel tmp]# cat /tmp/88865.vb
' =
-------------------------------------------------------------------------=
-----
' <autogenerated>
' This code was generated by a tool.
' Mono Runtime Version: 1.1.4322.573
'
' Changes to this file may cause incorrect behavior and will be =
lost if
' the code is regenerated.
' </autogenerated>
' =
-------------------------------------------------------------------------=
-----
Option Explicit Off
Option Strict On
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections
Imports System.Collections.Specialized
Imports System.Configuration
Imports System.Text
Imports System.Text.RegularExpressions
Imports System.Web
Imports System.Web.Caching
Imports System.Web.Security
Imports System.Web.SessionState
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls
Namespace ASP
Public Class default_aspx
Inherits System.Web.UI.Page
Implements System.Web.SessionState.IRequiresSessionState
Private Shared __intialized As Boolean =3D False
Private Shared __autoHandlers As Integer
Public Sub New()
If ((ASP.default_aspx.__intialized =3D False)) Then
ASP.default_aspx.__intialized =3D True
End If
End Sub
' Protected Overrides Property AutoHandlers As Integer
' Get
' Return ASP.default_aspx.__autoHandlers
' End Get
' Set (Value As Integer)
' ASP.default_aspx.__autoHandlers =3D Value
' End Set
' End Property
'/tmp/88865.vb(52,0) error BC30284: `ASP.default_aspx.AutoHandlers' no =
suitable properties found to override
' "Readonly" property would work; now the question is: is the bug in =
VBCodeGenerator or at Gonzalo's side?
Protected ReadOnly Property ApplicationInstance As =
System.Web.HttpApplication
Get
Return CType(Me.Context.ApplicationInstance, =
System.Web.HttpApplication)
End Get
End Property
Public Overrides ReadOnly Property TemplateSourceDirectory As =
String
Get
Return "/"
End Get
End Property
Private Sub __BuildControlTree(__ctrl As System.Web.UI.Control)
Dim __parser As System.Web.UI.IParserAccessor =3D =
CType(__ctrl, System.Web.UI.IParserAccessor)
__parser.AddParsedSubObject(New =
System.Web.UI.LiteralControl("<html>"&Microsoft.VisualBasic.Strings.ChrW(=
10)&"<body>"&Microsoft.VisualBasic.Strings.ChrW(10)&"Hello world of =
C#!"&Microsoft.VisualBasic.Strings.ChrW(10)&"</body>"&Microsoft.VisualBas=
ic.Strings.ChrW(10)&"</html>"&Microsoft.VisualBasic.Strings.ChrW(10)))
End Sub
Protected Overrides Sub FrameworkInitialize()
' Me.TraceModeValue =3D System.Web.TraceMode.SortByTime
'/tmp/88865.vb(72,0) error BC0029: Cannot convert implicitly from =
'integer' to 'System.Web.TraceMode'
'Compilation failed: 1 Error(s), 0 warnings
Me.Request.ValidateInput()
Me.__BuildControlTree(Me)
End Sub
Public Overrides Function GetTypeHashCode() As Integer
Return 1508043152
End Function
End Class
'Why is the indentation not working correctly here? --> see in =
mcs/class/System/Micrisoft.VisualBasic/VBCodeGenerator.cs
'Indent=3D0
End Namespace
'Indent=3D-1
If you want to build, you can use
mbas /tmp/88865.vb /target:library /r:System.Web
Regards
Jochen
*************************************************************************=
***
*************************************************************************=
***
CompuMaster GmbH
Agentur f=FCr moderne Kommunikation
Jochen Wezel, Multimedia-Programmierung
Rhein-Mosel-Stra=DFe 69, 56281 Emmelshausen, GERMANY
Fon: +49 6747 95084-12 / Fax: +49 6747 95084-50
http://www.compumaster.de eMail: jwezel@compumaster.de
+++ Mitglied im DEUTSCHEN MULTIMEDIA VERBAND d m m v, http://www.dmmv.de =
+++
*************************************************************************=
***
Unsere aktuellen AGBs befinden sich auf unserer Website im Bereich
"Rechtliches"
*************************************************************************=
***
Diese eMail enth=E4lt vertrauliche und/oder rechtlich gesch=FCtzte =
Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrt=FCmlich
erhalten haben, informieren Sie bitte sofort den Absender und vernichten =
Sie
diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe =
dieser
Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If =
you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail.
Any unauthorized copying, disclosure or distribution of the material in =
this
e-mail is strictly forbidden.
*************************************************************************=
***
*************************************************************************=
***
------_=_NextPart_001_01C48058.3D67AB83
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7226.0">
<TITLE>ASP.NET compilation of VB.NET</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=3D2 FACE=3D"Arial">Hi!</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">I've just tried to compile a sample =
page in VB.NET by the ASP.NET engine.</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">I only had to comment some lines (here =
in bold letters) to work around the current compile errors of VB.NET in =
Mono 1.0.1.</FONT></P>
<P><FONT SIZE=3D2 FACE=3D"Arial">I'm currently not able to download =
current CVS, that's why I post it here and hope, somebody takes an eye =
on. Maybe, it's already fixed, too…</FONT></P>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Arial">[root@lwezel tmp]# cat =
/tmp/88865.vb</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">' =
-------------------------------------------------------------------------=
-----</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">' <autogenerated></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">' This =
code was generated by a tool.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">' Mono =
Runtime Version: 1.1.4322.573</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">'</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">' =
Changes to this file may cause incorrect behavior and will be lost =
if</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">' the =
code is regenerated.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">' </autogenerated></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">' =
-------------------------------------------------------------------------=
-----</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Option Explicit Off</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Option Strict On</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Imports Microsoft.VisualBasic</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Imports System</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Imports System.Collections</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Imports =
System.Collections.Specialized</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Imports System.Configuration</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Imports System.Text</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Imports =
System.Text.RegularExpressions</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Imports System.Web</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Imports System.Web.Caching</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Imports System.Web.Security</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Imports System.Web.SessionState</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Imports System.Web.UI</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Imports =
System.Web.UI.WebControls</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Imports =
System.Web.UI.HtmlControls</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Namespace ASP</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> Public Class =
default_aspx</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> Inherits =
System.Web.UI.Page</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> Implements =
System.Web.SessionState.IRequiresSessionState</FONT>
</P>
<P><FONT SIZE=3D2 =
FACE=3D"Arial"> Private Shared =
__intialized As Boolean =3D False</FONT>
</P>
<P><FONT SIZE=3D2 =
FACE=3D"Arial"> Private Shared =
__autoHandlers As Integer</FONT>
</P>
<P><FONT SIZE=3D2 =
FACE=3D"Arial"> Public Sub =
New()</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nbs=
p; If ((ASP.default_aspx.__intialized =3D False)) Then</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nbs=
p; ASP.default_aspx.__intialized =3D =
True</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nbs=
p; End If</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> End Sub</FONT>
</P>
<P><B><FONT SIZE=3D2 =
FACE=3D"Arial">' Protected =
Overrides Property AutoHandlers As Integer</FONT></B>
<BR><B><FONT SIZE=3D2 =
FACE=3D"Arial">' &nb=
sp; Get</FONT></B>
<BR><B><FONT SIZE=3D2 =
FACE=3D"Arial">' &nb=
sp; Return =
ASP.default_aspx.__autoHandlers</FONT></B>
<BR><B><FONT SIZE=3D2 =
FACE=3D"Arial">' &nb=
sp; End Get</FONT></B>
<BR><B><FONT SIZE=3D2 =
FACE=3D"Arial">' &nb=
sp; Set (Value As Integer)</FONT></B>
<BR><B><FONT SIZE=3D2 =
FACE=3D"Arial">' &nb=
sp; ASP.default_aspx.__autoHandlers =3D =
Value</FONT></B>
<BR><B><FONT SIZE=3D2 =
FACE=3D"Arial">' &nb=
sp; End Set</FONT></B>
<BR><B><FONT SIZE=3D2 =
FACE=3D"Arial">' End =
Property</FONT></B>
<BR><B><FONT SIZE=3D2 FACE=3D"Arial">'/tmp/88865.vb(52,0) error BC30284: =
`ASP.default_aspx.AutoHandlers' no suitable properties found to =
override</FONT></B>
<BR><B><FONT SIZE=3D2 FACE=3D"Arial">' "Readonly" property =
would work; now the question is: is the bug in VBCodeGenerator or at =
Gonzalo's side?</FONT></B>
</P>
<P><FONT SIZE=3D2 =
FACE=3D"Arial"> Protected =
ReadOnly Property ApplicationInstance As =
System.Web.HttpApplication</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nbs=
p; Get</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nbs=
p; Return =
CType(Me.Context.ApplicationInstance, System.Web.HttpApplication)</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nbs=
p; End Get</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> End =
Property</FONT>
</P>
<P><FONT SIZE=3D2 =
FACE=3D"Arial"> Public =
Overrides ReadOnly Property TemplateSourceDirectory As String</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nbs=
p; Get</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nbs=
p; Return "/"</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nbs=
p; End Get</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> End =
Property</FONT>
</P>
<P><FONT SIZE=3D2 =
FACE=3D"Arial"> Private Sub =
__BuildControlTree(__ctrl As System.Web.UI.Control)</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nbs=
p; Dim __parser As System.Web.UI.IParserAccessor =3D CType(__ctrl, =
System.Web.UI.IParserAccessor)</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nbs=
p; __parser.AddParsedSubObject(New =
System.Web.UI.LiteralControl("<html>"&Microsoft.Visua=
lBasic.Strings.ChrW(10)&"<body>"&Microsoft.Visual=
Basic.Strings.ChrW(10)&"Hello world of =
C#!"&Microsoft.VisualBasic.Strings.ChrW(10)&"</body&=
gt;"&Microsoft.VisualBasic.Strings.ChrW(10)&"</html&=
gt;"&Microsoft.VisualBasic.Strings.ChrW(10)))</FONT></P>
<P><FONT SIZE=3D2 =
FACE=3D"Arial"> End Sub</FONT>
</P>
<P><FONT SIZE=3D2 =
FACE=3D"Arial"> Protected =
Overrides Sub FrameworkInitialize()</FONT>
<BR><B><FONT SIZE=3D2 =
FACE=3D"Arial"> =
' Me.TraceModeValue =3D System.Web.TraceMode.SortByTime</FONT></B>
<BR><B> =
<FONT SIZE=3D2 =
FACE=3D"Arial">'/tmp/88865.vb(72,0) error BC0029: Cannot convert =
implicitly from 'integer' to 'System.Web.TraceMode'</FONT></B>
<BR><B> =
<FONT SIZE=3D2 =
FACE=3D"Arial">'Compilation failed: 1 Error(s), 0 warnings</FONT></B>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nbs=
p; Me.Request.ValidateInput()</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nbs=
p; Me.__BuildControlTree(Me)</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> End Sub</FONT>
</P>
<P><FONT SIZE=3D2 =
FACE=3D"Arial"> Public =
Overrides Function GetTypeHashCode() As Integer</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nbs=
p; Return 1508043152</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> End =
Function</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> End Class</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> 'Why is the =
indentation not working correctly here? --> see in =
mcs/class/System/Micrisoft.VisualBasic/VBCodeGenerator.cs</FONT></P>
<P><FONT SIZE=3D2 FACE=3D"Arial"> 'Indent=3D0</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> End =
Namespace</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> 'Indent=3D-1</FONT>
</P>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Arial">If you want to build, you can =
use</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">mbas /tmp/88865.vb /target:library =
/r:System.Web</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Regards</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Jochen</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Courier =
New">********************************************************************=
********</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New">********************************************************************=
********</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">CompuMaster GmbH</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">Agentur f=FCr moderne =
Kommunikation</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">Jochen Wezel, =
Multimedia-Programmierung</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">Rhein-Mosel-Stra=DFe 69, 56281 =
Emmelshausen, GERMANY</FONT>
<BR><SPAN LANG=3D"fr"><FONT SIZE=3D2 FACE=3D"Courier New">Fon: +49 6747 =
95084-12 / Fax: +49 6747 95084-50</FONT></SPAN>
<BR><SPAN LANG=3D"de"></SPAN><A HREF=3D"http://www.compumaster.de"><SPAN =
LANG=3D"de"><U><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Courier =
New">http://www.compumaster.de</FONT></U></SPAN><SPAN =
LANG=3D"de"></SPAN></A><SPAN LANG=3D"de"></SPAN><SPAN =
LANG=3D"fr"></SPAN><SPAN LANG=3D"de"><FONT SIZE=3D2 FACE=3D"Courier =
New"> eMail: jwezel@compumaster.de</FONT></SPAN>
<BR><SPAN LANG=3D"de"><FONT SIZE=3D2 FACE=3D"Courier New">+++ Mitglied =
im DEUTSCHEN MULTIMEDIA VERBAND d m m v, </FONT></SPAN><A =
HREF=3D"http://www.dmmv.de"><SPAN LANG=3D"de"><U><FONT COLOR=3D"#0000FF" =
SIZE=3D2 FACE=3D"Courier =
New">http://www.dmmv.de</FONT></U></SPAN></A><SPAN LANG=3D"de"><FONT =
SIZE=3D2 FACE=3D"Courier New"> +++</FONT></SPAN>
</P>
<P><SPAN LANG=3D"de"><FONT SIZE=3D2 FACE=3D"Courier =
New">********************************************************************=
********</FONT></SPAN>
<BR><SPAN LANG=3D"de"><FONT SIZE=3D2 FACE=3D"Courier New">Unsere =
aktuellen AGBs befinden sich auf unserer Website im =
Bereich</FONT></SPAN>
<BR><SPAN LANG=3D"de"><FONT SIZE=3D2 FACE=3D"Courier =
New">"Rechtliches"</FONT></SPAN>
<BR><SPAN LANG=3D"de"><FONT SIZE=3D2 FACE=3D"Courier =
New">********************************************************************=
********</FONT></SPAN>
</P>
<P><SPAN LANG=3D"de"><FONT SIZE=3D2 FACE=3D"Courier New">Diese eMail =
enth=E4lt vertrauliche und/oder rechtlich gesch=FCtzte =
Informationen.</FONT></SPAN>
<BR><SPAN LANG=3D"de"><FONT SIZE=3D2 FACE=3D"Courier New">Wenn Sie nicht =
der richtige Adressat sind oder diese E-Mail irrt=FCmlich</FONT></SPAN>
<BR><SPAN LANG=3D"de"><FONT SIZE=3D2 FACE=3D"Courier New">erhalten =
haben, informieren Sie bitte sofort den Absender und vernichten =
Sie</FONT></SPAN>
<BR><SPAN LANG=3D"de"><FONT SIZE=3D2 FACE=3D"Courier New">diese Mail. =
Das unerlaubte Kopieren sowie die unbefugte Weitergabe =
dieser</FONT></SPAN>
<BR><SPAN LANG=3D"en-gb"><FONT SIZE=3D2 FACE=3D"Courier New">Mail ist =
nicht gestattet.</FONT></SPAN>
</P>
<P><SPAN LANG=3D"en-gb"><FONT SIZE=3D2 FACE=3D"Courier New">This e-mail =
may contain confidential and/or privileged information. If =
you</FONT></SPAN>
<BR><SPAN LANG=3D"en-gb"><FONT SIZE=3D2 FACE=3D"Courier New">are not the =
intended recipient (or have received this e-mail in error)</FONT></SPAN>
<BR><SPAN LANG=3D"en-gb"><FONT SIZE=3D2 FACE=3D"Courier New">please =
notify the sender immediately and destroy this e-mail.</FONT></SPAN>
<BR><SPAN LANG=3D"en-gb"><FONT SIZE=3D2 FACE=3D"Courier New">Any =
unauthorized copying, disclosure or distribution of the material in =
this</FONT></SPAN>
<BR><SPAN LANG=3D"en-gb"><FONT SIZE=3D2 FACE=3D"Courier New">e-mail is =
strictly forbidden.</FONT></SPAN>
<BR><SPAN LANG=3D"de"><FONT SIZE=3D2 FACE=3D"Courier =
New">********************************************************************=
********</FONT></SPAN>
<BR><SPAN LANG=3D"de"><FONT SIZE=3D2 FACE=3D"Courier =
New">********************************************************************=
********</FONT></SPAN>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C48058.3D67AB83--