Skip to content

Latest commit

 

History

History
88 lines (64 loc) · 7.11 KB

pi.md

File metadata and controls

88 lines (64 loc) · 7.11 KB

HomeVB 7+VB 1-6FBQB64QB45GW-BASICMicroRetro

Raspberry Pi (RaspPi)

BASIC

PICO

Visual Basic via .NET Core

For the most part, discussions in this section are going to be specific to Pi4 running Raspbian and Visual Basic as it exists through .NET Core. At the time of this writing the official release of .NET Core is v3.1; v5 is "just around the corner".

There are basically two paths to developing for Pi; one is to use another PC (Windows 10 for example) and the other is developing directly on the Pi.

Using Windows 10

  • Visual Studio 2019: I prefer the Community Edition: from what I understand it is free for personal use,, small project/team use (5 or less in size) and or active contribution to open source. Hint: This website is actually open source; please feel free to contribute via github. ;-) When you install, be sure to select .NET desktop development and .NET Core cross-platform development.
  • GTK# for .NET: Note: Do not need to install Mono; just click the Download Gtk# "button".

Using Raspbian

  • .NET Core or this HowTo
  • How to install Visual Studio Code on a Raspberry Pi 4 in minutes (Scott Hanselman): Please note that the build for this is actually targeting stretch, not buster - but seems to work just fine.
  • VB.NET Grammar and Snippets for VSCode: This provides the appropriate experience for writing Visual Basic since the out-of-the-box experience, well to put it plainly, sucks.
  • (Todo) Need to verify, validate, update regarding the installation of GTK.
  • (Todo) Need to provide instructions for patching the VSCode installation so that you can launch using "code" instead of "code-oss".
  • (Todo) Need to provide instructions for modifying the terminal instances so that the path stuff is automatically attached.

To make things simpler (since I prefer to develop on Windows 10), I also setup remote desktop from Windows 10 to Pi4 following the instructions for Remote desktop with xrdp using this.

Building a GUI-style Application

The following instructions are an overview (500 mile high) set of actions you must do regardless of whether or not you are developing using Visual Studio 2019 (Windows 10) or Visual Studio Code (Raspbian).

  • For the first time (once), you'll need to also install Glade. For Raspbian, see here.
  • Create a regular Console application for .NET Core 3.1.
  • Need to modify the "<OutputType>Exe</OutputType>" to "<OutputType>WinExe</OutputType>"
  • Need to add the nuget package for "GtkSharp"
  • Need to add the nuget package for "System.Drawing.Common"

Tutorials

Q&A

Helpful Links

For future research