1Run
Posts: 2
Joined: Sun Oct 22, 2017 2:17 am

Run Visual Basic App on RP

Sat Feb 08, 2020 12:09 am

Hey everyone,
I am new to the community, so tell me if I am doing something wrong. I have an application that I made in Visual Basic and I was wanting to run it on a pi. Is this possible? If so, what steps do I need to take to get it ready and what hardware do I need?

ejolson
Posts: 4452
Joined: Tue Mar 18, 2014 11:47 am

Re: Run Visual Basic App on RP

Sun Feb 09, 2020 2:36 am

1Run wrote:
Sat Feb 08, 2020 12:09 am
Hey everyone,
I am new to the community, so tell me if I am doing something wrong. I have an application that I made in Visual Basic and I was wanting to run it on a pi. Is this possible? If so, what steps do I need to take to get it ready and what hardware do I need?
Depending on which version of Visual Basic and whether you made unlucky use of deprecated mouse interfaces, it could be as easy as vbnc for mono.

https://www.mono-project.com/docs/about ... sualbasic/

In my experience vbnc works quite well. Note that you do not need to follow the install instructions on the page linked above because vbnc is in the standard Raspbian repositories. A single apt-get install command will fetch everything needed to compile and run a program.

1Run
Posts: 2
Joined: Sun Oct 22, 2017 2:17 am

Re: Run Visual Basic App on RP

Sun Feb 09, 2020 3:19 am

Do you know if .NET framework version 4.7.2 is covered?

ejolson
Posts: 4452
Joined: Tue Mar 18, 2014 11:47 am

Re: Run Visual Basic App on RP

Sun Feb 09, 2020 3:40 am

1Run wrote:
Sun Feb 09, 2020 3:19 am
Do you know if .NET framework version 4.7.2 is covered?
Sorry, I'm not an expert in different versions. There is some information about application portability on the Mono webpage at

https://www.mono-project.com/docs/getti ... rtability/

According to the webpage
Mono Documentation wrote:You can continue to use Visual Studio to develop your applications on Windows, the binaries produced by Visual Studio are binary compatible with Mono, so you only need to get these files to your Linux/Unix server.
However, I've never tried that.

hippy
Posts: 6836
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Run Visual Basic App on RP

Sun Feb 09, 2020 11:28 am

1Run wrote:
Sat Feb 08, 2020 12:09 am
I have an application that I made in Visual Basic and I was wanting to run it on a pi. Is this possible? If so, what steps do I need to take to get it ready and what hardware do I need?
I believe any Pi should work though I haven't checked with a Pi Zero or other Pre-3B boards. If you don't have a Pi then a 4B is likely the best choice, and possibly the more memory the better.

To install Mono and VB.Net support ...

Code: Select all

sudo apt-get install mono-complete
sudo apt-get install mono-vbnc

Code: Select all

pi@Pi3B:~/tmp $ mono --version
Mono JIT compiler version 5.18.0.240 (Debian 5.18.0.240+dfsg-3 Sat Apr 20 05:16:08 UTC 2019)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com

Code: Select all

pi@Pi3B:~/tmp $ vbnc /?
Visual Basic.Net Compiler version 0.0.0.5943 (Mono 4.0.1 - tarball)
Copyright (C) 2004-2010 Rolf Bjarne Kvinge. All rights reserved.
fibo.vb

Code: Select all

Module RecursiveFibonacci

  Function Fibo(ByVal n As Integer) As Integer
    If n <= 1 Then
      Return n
    Else
      Return Fibo(n-1) + Fibo(n-2)
    End If
  End Function

  Sub Main()
    Console.WriteLine(Fibo(24))
  End Sub

End Module

Code: Select all

pi@Pi3B:~/tmp $ vbnc fibo.vb
Visual Basic.Net Compiler version 0.0.0.5943 (Mono 4.0.1 - tarball)
Copyright (C) 2004-2010 Rolf Bjarne Kvinge. All rights reserved.

Assembly 'fibo, Version=0.0, Culture=neutral, PublicKeyToken=null' saved successfully to '/home/pi/tmp/fibo.exe'.
Compilation successful
Compilation took 00:00:03.9029930

Code: Select all

pi@Pi3B:~/tmp $ time ./fibo.exe
46368

real    0m0.149s
user    0m0.130s
sys     0m0.015s
Beyond that I haven't done much with VB.Net on a Pi, don't have an answer to your .Net Framework 4.7.2 question. Try it and see may be the best suggestion.

Return to “General programming discussion”