[mono-vb] example solutions to rebuild?

Rolf Bjarne Kvinge rolflists at ya.com
Wed Dec 17 03:58:01 EST 2008


Hi,

> I load up the solution in monodevelop (1.9.1), and try and rebuild and
> I
> get the System.Deployment error.
> Taking the build output and removing System.Deployment, I run that in
> the terminal like so (
> vbnc is version 0.0.0.5904 installed through fedora repos.):
>  > vbnc -out:"/home/paul/mono/Calculator/bin/Debug/Calculator.exe"
> -nologo -utf8output -debug:full -rootnamespace:"Calculator"
> -target:winexe  -r:/usr/lib64/mono/2.0/System.dll
> -r:/usr/lib64/mono/2.0/System.Data.dll
> -r:/usr/lib64/mono/2.0/System.Drawing.dll
> -r:/usr/lib64/mono/2.0/System.Windows.Forms.dll
> -r:/usr/lib64/mono/2.0/System.Xml.dll
> "/home/paul/mono/Calculator/FrmClac.vb"
> "/home/paul/mono/Calculator/FrmClac.Designer.vb"
> "/home/paul/mono/Calculator/My Project/AssemblyInfo.vb"
> "/home/paul/mono/Calculator/My Project/Application.Designer.vb"
> "/home/paul/mono/Calculator/My Project/Resources.Designer.vb"
> "/home/paul/mono/Calculator/My Project/Settings.Designer.vb"
> "-
> resource:/home/paul/mono/Calculator/FrmClac.resources,Calculator.FrmCal
> c.resources"
> "-resource:/home/paul/mono/Calculator/My
> Project/Resources.resources,Calculator.My Project.Resources.resources"
> 
> 
> I get many errors:
> 
> /home/paul/mono/Calculator/FrmClac.vb (441,24) : Error VBNC30451: Could
not resolve the name 'MessageBox'

I keep forgetting about this.

It's a bug in MonoDevelop:
https://bugzilla.novell.com/show_bug.cgi?id=431112

The project-level imports aren't loaded and passed to the compiler.

You can right-click the project, select compiler options, and in the fields
for additional arguments to the compiler put:
-imports:System.Windows.Forms,System.Drawing,...

Rolf

> /home/paul/mono/Calculator/FrmClac.vb (450,24) : Error VBNC30451: Could
> not resolve the name 'MessageBox'
> /home/paul/mono/Calculator/FrmClac.vb (459,24) : Error VBNC30451: Could
> not resolve the name 'MessageBox'
> /home/paul/mono/Calculator/FrmClac.vb (468,24) : Error VBNC30451: Could
> not resolve the name 'MessageBox'
> 
> and the list continues from there referencing MessageBox and later
> Keys,
> and finally /home/paul/mono/<MyGenerator> (1,1) : Error VBNC99999:
> Unexpected error: Object reference not set to an instance of an object
> 
> 
> I don't have VS to test compilation in Windows.
> 
> I can take various other single snipets of code including
> System.Windows.Forms and compile and run them in mono with no problem.



More information about the Mono-vb mailing list