Posts: 23
Joined: Thu Mar 22, 2018 3:19 am

C# tool chain?

Thu Mar 22, 2018 3:29 am

I've spend a very frustrating several days trying to figure out how I can develop C# gui software for use on the RPI using my Windows desktop.

I've got my Pi set up with mono and wiringpi and packages to let me access gpio etc but I can't even refer to the libraries when coding on the desktop machine - just generic winforms and .net platform independent stuff or it gets all huffy.

I attempted to use Monodevelop on windows, followed all the instructions to a T but it won't build completely because of something called po. Googled half a day and not one mention of what the problem is.

So then I figured I'm just use vnc and MD on the Raspberry 3, its fast enough - maybe not blazing but more than tolerable for coding time though builds are when I drive the 25k to town for a Mocha Cappuccino. It was going pretty well until it came time to investigate GUI building - THey're using that XAML crap! I want to put controls where I want them in a form, not wherever that opaque XAML decides they should go. Hell, I set a window size to 200,200 and it went to something like 2x8 AT 200,200 on the screen.

So it's back to the Desktop for winforms but then of course I can't use any Pi hardware.

How do you make the bridge between the two?

Posts: 23
Joined: Thu Mar 22, 2018 3:19 am

Re: C# tool chain?

Sun Mar 25, 2018 2:53 pm

I figured it out - Keep the project files on a Samba share and you can build from the PC then navigate to the bin directory on the Pi and run the program. I guess VS is looking for the libraries on the machine the project resides on rather than the one VS is running on because it doesn't have any problems with references to libraries that only exist on the Pi.

Even better, get MonoRemoteDebugger and run in a second CLI (or detach but it does give some information at times). Download the VS plugin for MonoRemoteDebugger then you can use its Remote Debug item to build and run on the Pi (Weird running from the PC and having a GUI pop up in the Pi Desktop!).

MonoRemoteDebugger doesn't report build errors so I always use the regular build command to check for problems then Remote Debug.

Return to “Other languages”

Who is online

Users browsing this forum: No registered users and 2 guests