howto develop c# on raspbian and vs 2019

asked 2021-01-14T11:29:24.053+00:00
Frank Sarlemijn 21 Reputation points

I would like to write a simple file transfering app on a SBC. I have chosen raspberry pi for this. Windows IoT proved to be unreliable and I gather from the web that Microsoft stopped the development of this in favor of using Linux (in this case raspbian) as OS. Correct so far? Visual Studio can crosscompile for ARM processers and it can do remote debugging. I am having trouble getting to remote debug an app on the raspberry pi. Setting authentication mode to 'universal' in VS gets a dialog asking for a PIN number, setting the authentication mode to 'none' tells me that msvsmon.exe is not running on the remote computer. My last development experience is 10 years ago, I need some pointers to get these modern developments working, thank you!

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
693 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
694 questions
.NET Internet of things
.NET Internet of things
.NET: Microsoft Technologies based on the .NET software framework.Internet of things:
22 questions
{count} votes

Accepted answer
  1. answered 2021-01-14T20:03:11.18+00:00
    David Lowndes 4,231 Reputation points Microsoft MVP

    Using the instructions here worked for me.

    I created a .NET Core console project using the latest VS 2019, changed its project settings to be .NET Core 5 (it's created as 3.1).

    On the Pi (a 3B which already had the prerequisites installed to have an SSH connection), I downloaded .NET Core 5, followed the installation instructions on that page and checked that dotnet ran.

    I copied over the built .net5.0 project binaries from Windows to my Pi using WinSCP.

    Using the Pi, I determined that the console DLL could be run by dotnet MyCodeName.dll.

    While the code is running (I'd stuck a Console.ReadKey() line in), I could attach with the VS debugger using the instructions given.

    It's a slight faff compared to the relatively seamless experience of native code, but it worked.


0 additional answers

Sort by: Most helpful