[mono-vb] Vb.net Compilation Error

Rolf Bjarne Kvinge rolflists at ya.com
Mon May 5 17:50:07 EDT 2008

The Button1 variable is probably declared in a partial class in another file
(so you get a duplicate declaration)


What I suppose you can do is to add then handler manually ("AddHandler
Button1.Click, Button1_Click" in an overridden Load method for instance)




From: Nick Jolin [mailto:njolin at cvikota.com] 
Sent: lunes, 05 de mayo de 2008 20:33
To: 'Rolf Bjarne Kvinge'
Subject: RE: [mono-vb] Vb.net Compilation Error


Hi, I'm sorry,  if I remove the Handles, then the button event does not
fire.  And if I add Private WithEvents Button 1 as Button,  It says its
already declared?




Thank you for your help.





From: Rolf Bjarne Kvinge [mailto:rolflists at ya.com] 
Sent: Monday, May 05, 2008 11:49 AM
To: 'Nick Jolin'; mono-vb at lists.ximian.com
Subject: RE: [mono-vb] Vb.net Compilation Error




This looks like a known bug (regarding WithEvents/Handles clauses, if you
remove the Handles clause or add the missing WithEvents clause it should




From: mono-vb-bounces at lists.ximian.com
[mailto:mono-vb-bounces at lists.ximian.com] On Behalf Of Nick Jolin
Sent: lunes, 05 de mayo de 2008 17:28
To: mono-vb at lists.ximian.com
Subject: [mono-vb] Vb.net Compilation Error


Hi,  I'm new to mono, and I am trying to setup a very simple Asp.net test

Running on Ubuntu 8.04, and Mono 1.9 from compiled from source.


In the Page.Load I have: Response.Write("it is working"), and this works
just fine, rendering on the page.


If I add a button, with a response.write("it worked"), I get a compilation


It seems that if I add any kind of control to the page, it errors out.  If I
precompile the website in vs2005, - then it works fine.


Am I doing something wrong?




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: (0,0) : error VBNC_CRASH: Visual Basic.Net Compiler
Copyright (C) 2004-2007 Rolf Bjarne Kvinge. All rights reserved.

/tmp/www-data-temp-aspnet-0/eb3a30fb/App_Web_179e9399_1.vb (12,18) : Warning
VBNC99998: Option Strict Off will probably fail.
Error : VBNC99999: Unexpected error: Cannot cast from source type to
destination type.
at vbnc.EventMemberSpecifier.ResolveCode (vbnc.ResolveInfo Info) [0x00124]
in /home/mono-basic-1.9/vbnc/vbnc/source/Members/EventMemberSpecifier.vb:102

at vbnc.Helper.ResolveCodeCollection (IEnumerable Collection,
vbnc.ResolveInfo Info) [0x00044] in
at vbnc.BaseList`1[vbnc.EventMemberSpecifier].ResolveCode (vbnc.ResolveInfo
Info) [0x00000] in
at vbnc.HandlesClause.ResolveCode (vbnc.ResolveInfo Info) [0x00000] in
at vbnc.HandlesOrImplements.ResolveCode (vbnc.ResolveInfo Info) [0x00000] in
at vbnc.SubDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00013] in
at vbnc.Helper.ResolveCodeCollection (IEnumerable Collection,
vbnc.ResolveInfo Info) [0x00044] in
at vbnc.BaseObjects`1[vbnc.IMember].ResolveCode (vbnc.ResolveInfo Info)
[0x00000] in
at vbnc.TypeDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x0001c] in
at vbnc.ClassDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00002] in
at vbnc.AssemblyDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x0002a] in
at vbnc.Compiler.Compile_Resolve () [0x001a9] in
at vbnc.Compiler.Compile () [0x0028a] in
Compilation took 00:00:01.9909480


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-vb/attachments/20080505/b03c8d8a/attachment-0001.html 

More information about the Mono-vb mailing list