vbnc: compile .vb with DLL reference

View: New views
9 Messages — Rating Filter:   Alert me  

vbnc: compile .vb with DLL reference

by AlterX76 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
i'm trying to compile a little example.

Form1.vb has a reference to a DLL managed library.

How can I specify that above from command line?

es: vbnc Form1.vb

Output:
libGenCrack\Example\dotnet2\MasterExample\Form1.vb (3,61) : Error VBNC30451:
Could not resolve the name 'libGenCrack_net2'


libGenCrack_net2 is DLL library referenced.

Thanks in advance

Re: vbnc: compile .vb with DLL reference

by Rafael Teixeira :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The command

man vbnc

will tell you all the command line options.
The one you need just now is the -r that allows you to reference a managed library.

Fun,

On Tue, Jun 16, 2009 at 12:01 PM, AlterX76 <alterx@...> wrote:

Hi,
i'm trying to compile a little example.

Form1.vb has a reference to a DLL managed library.

How can I specify that above from command line?

es: vbnc Form1.vb

Output:
libGenCrack\Example\dotnet2\MasterExample\Form1.vb (3,61) : Error VBNC30451:
Could not resolve the name 'libGenCrack_net2'


libGenCrack_net2 is DLL library referenced.

Thanks in advance
--
View this message in context: http://www.nabble.com/vbnc%3A-compile-.vb-with-DLL-reference-tp24056222p24056222.html
Sent from the Mono - VB mailing list archive at Nabble.com.

_______________________________________________
Mono-vb mailing list
Mono-vb@...
http://lists.ximian.com/mailman/listinfo/mono-vb



--
Rafael "Monoman" Teixeira
---------------------------------------
"To be creative means to be in love with life. You can be creative only if you love life enough that you want to enhance its beauty, you want to bring a little more music to it, a little more poetry to it, a little more dance to it."
Osho

_______________________________________________
Mono-vb mailing list
Mono-vb@...
http://lists.ximian.com/mailman/listinfo/mono-vb

Re: vbnc: compile .vb with DLL reference

by AlterX76 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rafael Teixeira wrote:
The command

man vbnc

will tell you all the command line options.
The one you need just now is the -r that allows you to reference a managed
library.
Thanks...I'm using win32 and I've tried that:

vbnc /target:winexe /addmodule:mylib.dll Form1.vb

That above show me VBNC30451 that indicates problem in nested class. :-(
mylib.dll is C++ managed that nested a class into another one.
Is there a way to resolve it without change code?

Re: vbnc: compile .vb with DLL reference

by Rolf Bjarne Kvinge-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

> >
> > The command
> >
> > man vbnc
> >
> > will tell you all the command line options.
> > The one you need just now is the -r that allows you to reference a
managed
> > library.
> >
>
> Thanks...I'm using win32 and I've tried that:
>
> vbnc /target:winexe /addmodule:mylib.dll Form1.vb

You want /r:mylib.dll and not /addmodule.

Rolf

>
> That above show me VBNC30451 that indicates problem in nested class. :-
> (
> mylib.dll is C++ managed that nested a class into another one.
> Is there a way to resolve it without change code?
> --
> View this message in context: http://www.nabble.com/vbnc%3A-compile-
> .vb-with-DLL-reference-tp24056222p24161988.html
> Sent from the Mono - VB mailing list archive at Nabble.com.
>
> _______________________________________________
> Mono-vb mailing list
> Mono-vb@...
> http://lists.ximian.com/mailman/listinfo/mono-vb

_______________________________________________
Mono-vb mailing list
Mono-vb@...
http://lists.ximian.com/mailman/listinfo/mono-vb

Re: vbnc: compile .vb with DLL reference

by AlterX76 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rolf Bjarne Kvinge-2 wrote:
You want /r:mylib.dll and not /addmodule.
Thank you...
Now vbnc displays that (I'm running whitin mono-command prompt):

G:\libGenCrack\Example\dotnet2\MasterExample>vbnc /target:winexe /r:libGenCrack_
net2.dll form1.vb /out:prova.exe
Visual Basic.Net Compiler version 0.0.0.5914 (Mono 2.4 - r)
Copyright (C) 2004-2008 Rolf Bjarne Kvinge. All rights reserved.


Error : VBNC99999: Unexpected error: An exception was thrown by the type initial
izer for <Module>
  at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom (string,boo
l)
  at System.Reflection.Assembly.LoadFrom (System.String assemblyFile) [0x00000]

  at vbnc.TypeManager.LoadAssembly (System.String Filename) [0x00000]
  at vbnc.TypeManager.LoadReferencedAssemblies () [0x00000]
  at vbnc.TypeManager.LoadReferenced () [0x00000]
  at vbnc.Compiler.Compile () [0x00000]
Compilation took 00:00:00.8159616

** (C:\PROGRA~1\Mono-2.4\lib\mono\2.0\vbnc.exe:3564): WARNING **: The following
assembly referenced from C:\PROGRA~1\Mono-2.4\lib\mono\2.0\System.dll could not
be loaded:
     Assembly:   System.Configuration    (assemblyref_index=1)
     Version:    2.0.0.0
     Public Key: b03f5f7f11d50a3a
The assembly was not found in the Global Assembly Cache, a path listed in the MO
NO_PATH environment variable, or in the location of the executing assembly (C:\P
ROGRA~1\Mono-2.4\lib\mono\2.0\).


** (C:\PROGRA~1\Mono-2.4\lib\mono\2.0\vbnc.exe:3564): WARNING **: Could not load
 file or assembly 'System.Configuration, Version=2.0.0.0, Culture=neutral, Publi
cKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

** (C:\PROGRA~1\Mono-2.4\lib\mono\2.0\vbnc.exe:3564): WARNING **: Missing method
 GetSection in assembly C:\PROGRA~1\Mono-2.4\lib\mono\2.0\System.dll, type Syste
m.Configuration.ConfigurationManager
Could not load file or assembly 'System.Configuration, Version=2.0.0.0, Culture=
neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
  at System.Diagnostics.DiagnosticsConfiguration.get_Settings () [0x00000]
  at System.Diagnostics.TraceImpl.InitOnce () [0x00000]
  at System.Diagnostics.TraceImpl.get_Listeners () [0x00000]
  at System.Diagnostics.TraceImpl.get_ListenersSyncRoot () [0x00000]
  at System.Diagnostics.TraceImpl.WriteLine (System.String message) [0x00000]
  at System.Diagnostics.Debug.WriteLine (System.String message) [0x00000]
  at vbnc.Main.Main (System.String[] CmdArgs) [0x00000]
Failed compilation took 00:00:00.8915136

Re: vbnc: compile .vb with DLL reference

by Rolf Bjarne Kvinge-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

> Thank you...
> Now vbnc displays that (I'm running whitin mono-command prompt):
>
> G:\libGenCrack\Example\dotnet2\MasterExample>vbnc /target:winexe>
/r:libGenCrack_net2.dll form1.vb /out:prova.exe
> Visual Basic.Net Compiler version 0.0.0.5914 (Mono 2.4 - r)
> Copyright (C) 2004-2008 Rolf Bjarne Kvinge. All rights reserved.
>
>
> Error : VBNC99999: Unexpected error: An exception was thrown by the
> type initial izer for <Module>
>   at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom
(string,bool)
>   at System.Reflection.Assembly.LoadFrom (System.String assemblyFile)
[0x00000]
>   at vbnc.TypeManager.LoadAssembly (System.String Filename) [0x00000]
>   at vbnc.TypeManager.LoadReferencedAssemblies () [0x00000]
>   at vbnc.TypeManager.LoadReferenced () [0x00000]
>   at vbnc.Compiler.Compile () [0x00000]
> Compilation took 00:00:00.8159616
>
> ** (C:\PROGRA~1\Mono-2.4\lib\mono\2.0\vbnc.exe:3564): WARNING **: The
following assembly referenced from
C:\PROGRA~1\Mono-2.4\lib\mono\2.0\System.dll could not be loaded:
>      Assembly:   System.Configuration    (assemblyref_index=1)
>      Version:    2.0.0.0
>      Public Key: b03f5f7f11d50a3a

Do you have this assembly?

And what happens if you try the exact same command but within a normal
command prompt, not the mono one?

Rolf

_______________________________________________
Mono-vb mailing list
Mono-vb@...
http://lists.ximian.com/mailman/listinfo/mono-vb

Re: vbnc: compile .vb with DLL reference

by AlterX76 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rolf Bjarne Kvinge-2 wrote:
Do you have this assembly?

And what happens if you try the exact same command but within a normal
command prompt, not the mono one?

Rolf
I think that assembly is present (within mono installation).
Anywhere, below output from normal dos prompt:

-----
Visual Basic.Net Compiler version 0.0.0.5914 (Mono 2.4 - r)
Copyright (C) 2004-2008 Rolf Bjarne Kvinge. All rights reserved.


Error : VBNC99999: Unexpected error: An exception was thrown by the type initializer for <Module>
  at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom (string,bool)
  at System.Reflection.Assembly.LoadFrom (System.String assemblyFile) [0x00000]
  at vbnc.TypeManager.LoadAssembly (System.String Filename) [0x00000]
  at vbnc.TypeManager.LoadReferencedAssemblies () [0x00000]
  at vbnc.TypeManager.LoadReferenced () [0x00000]
  at vbnc.Compiler.Compile () [0x00000]
Compilation took 00:00:00.7968036

** (C:\PROGRA~1\Mono-2.4\lib\mono\2.0\vbnc.exe:3536): WARNING **: The following assembly referenced from C:\PROGRA~1\Mono-2.4\lib\mono\2.0\System.dll could not be loaded:
     Assembly:   System.Configuration    (assemblyref_index=1)
     Version:    2.0.0.0
     Public Key: b03f5f7f11d50a3a
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (C:\PROGRA~1\Mono-2.4\lib
\mono\2.0\).


** (C:\PROGRA~1\Mono-2.4\lib\mono\2.0\vbnc.exe:3536): WARNING **: Could not load file or assembly 'System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11
d50a3a' or one of its dependencies.

** (C:\PROGRA~1\Mono-2.4\lib\mono\2.0\vbnc.exe:3536): WARNING **: Missing method GetSection in assembly C:\PROGRA~1\Mono-2.4\lib\mono\2.0\System.dll, type System.Configuration.Conf
igurationManager
Could not load file or assembly 'System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
  at System.Diagnostics.DiagnosticsConfiguration.get_Settings () [0x00000]
  at System.Diagnostics.TraceImpl.InitOnce () [0x00000]
  at System.Diagnostics.TraceImpl.get_Listeners () [0x00000]
  at System.Diagnostics.TraceImpl.get_ListenersSyncRoot () [0x00000]
  at System.Diagnostics.TraceImpl.WriteLine (System.String message) [0x00000]
  at System.Diagnostics.Debug.WriteLine (System.String message) [0x00000]
  at vbnc.Main.Main (System.String[] CmdArgs) [0x00000]
Failed compilation took 00:00:00.9061688

Re: vbnc: compile .vb with DLL reference

by Rolf Bjarne Kvinge-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



> -----Original Message-----
> From: mono-vb-bounces@... [mailto:mono-vb-
> bounces@...] On Behalf Of AlterX76
> Sent: lunes, 29 de junio de 2009 13:11
> To: mono-vb@...
> Subject: Re: [mono-vb] vbnc: compile .vb with DLL reference
>
>
>
> Rolf Bjarne Kvinge-2 wrote:
> >
> > Do you have this assembly?
> >
> > And what happens if you try the exact same command but within a
> normal
> > command prompt, not the mono one?
> >
> > Rolf
> >
> I think that assembly is present (within mono installation).
> Anywhere, below output from normal dos prompt:
>

Oh sorry, replace "vbnc" in your normal dos prompt with
"C:\PROGRA~1\Mono-2.4\lib\mono\2.0\vbnc.exe".

This way vbnc should be executed with .NET instead of mono (just to see if
it makes a difference).

Rolf

> -----
> Visual Basic.Net Compiler version 0.0.0.5914 (Mono 2.4 - r)
> Copyright (C) 2004-2008 Rolf Bjarne Kvinge. All rights reserved.
>
>
> Error : VBNC99999: Unexpected error: An exception was thrown by the
> type
> initializer for <Module>
>   at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom
> (string,bool)
>   at System.Reflection.Assembly.LoadFrom (System.String assemblyFile)
> [0x00000]
>   at vbnc.TypeManager.LoadAssembly (System.String Filename) [0x00000]
>   at vbnc.TypeManager.LoadReferencedAssemblies () [0x00000]
>   at vbnc.TypeManager.LoadReferenced () [0x00000]
>   at vbnc.Compiler.Compile () [0x00000]
> Compilation took 00:00:00.7968036
>
> ** (C:\PROGRA~1\Mono-2.4\lib\mono\2.0\vbnc.exe:3536): WARNING **: The
> following assembly referenced from
> C:\PROGRA~1\Mono-2.4\lib\mono\2.0\System.dll could not be loaded:
>      Assembly:   System.Configuration    (assemblyref_index=1)
>      Version:    2.0.0.0
>      Public Key: b03f5f7f11d50a3a
> The assembly was not found in the Global Assembly Cache, a path listed
> in
> the MONO_PATH environment variable, or in the location of the executing
> assembly (C:\PROGRA~1\Mono-2.4\lib
> \mono\2.0\).
>
>
> ** (C:\PROGRA~1\Mono-2.4\lib\mono\2.0\vbnc.exe:3536): WARNING **: Could
> not
> load file or assembly 'System.Configuration, Version=2.0.0.0,
> Culture=neutral, PublicKeyToken=b03f5f7f11
> d50a3a' or one of its dependencies.
>
> ** (C:\PROGRA~1\Mono-2.4\lib\mono\2.0\vbnc.exe:3536): WARNING **:
> Missing
> method GetSection in assembly C:\PROGRA~1\Mono-
> 2.4\lib\mono\2.0\System.dll,
> type System.Configuration.Conf
> igurationManager
> Could not load file or assembly 'System.Configuration, Version=2.0.0.0,
> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
> dependencies.
>   at System.Diagnostics.DiagnosticsConfiguration.get_Settings ()
> [0x00000]
>   at System.Diagnostics.TraceImpl.InitOnce () [0x00000]
>   at System.Diagnostics.TraceImpl.get_Listeners () [0x00000]
>   at System.Diagnostics.TraceImpl.get_ListenersSyncRoot () [0x00000]
>   at System.Diagnostics.TraceImpl.WriteLine (System.String message)
> [0x00000]
>   at System.Diagnostics.Debug.WriteLine (System.String message)
> [0x00000]
>   at vbnc.Main.Main (System.String[] CmdArgs) [0x00000]
> Failed compilation took 00:00:00.9061688
>
> --
> View this message in context: http://www.nabble.com/vbnc%3A-compile-
> .vb-with-DLL-reference-tp24056222p24252227.html
> Sent from the Mono - VB mailing list archive at Nabble.com.
>
> _______________________________________________
> Mono-vb mailing list
> Mono-vb@...
> http://lists.ximian.com/mailman/listinfo/mono-vb

_______________________________________________
Mono-vb mailing list
Mono-vb@...
http://lists.ximian.com/mailman/listinfo/mono-vb

Re: vbnc: compile .vb with DLL reference

by AlterX76 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rolf Bjarne Kvinge-2 wrote:
Oh sorry, replace "vbnc" in your normal dos prompt with
"C:\PROGRA~1\Mono-2.4\lib\mono\2.0\vbnc.exe".

This way vbnc should be executed with .NET instead of mono (just to see if
it makes a difference).
Previous reply shows that you've asked me!