0

I want to use latest Mono (5.4.1.6) to write a console app in Visual Studio 2015/2017 for a Raspberry Pi 3 (Linux). Searching the web I've found that it is possible to use Visual Studio, but there are limitations.

I can use MonoRemoteDebugger, but I also need to target Mono framework, not .NET framework, because I do not know if they are fully compatible. Adding the Mono target profile works only up to profile 4.0 and I want to use the latest Mono (.NET 4.5).

MDebug looks fine, but it is not free.

Mono Helper also looks fine, but how can I remotely debug the app?

I can use Xamarin Studio 6.3 configured for remote debugging, but I have not tested it and I do not know how well it works. Also, I prefer Visual Studio and it would be great if I avoided installing a different IDE if VS could do the job.

So, is it possible to remotely debug Mono app from Visual Studio? Should I try Visual Studio Code?

If I finished my app, then how can I generate the release build?

I've noticed that the plugins have the option to debug the app, but not for generating the release build.

This is new to me and information found on the web did not help me understand everything I need to do my work. Any help would be appreciated. Thank you!

Cristian M
  • 195
  • 1
  • 1
  • 15
  • Am i wrong, or. When you write application with Mono you use just their multiplatform .NET framework, when you open that application in Visual Studio and configure it, you should use default .NET framework. And it becomes a default vs application so you should search how to debug it – Markiian Benovskyi Jan 10 '18 at 12:56
  • @MarkBenovsky If I write the app in Xamarin (aka MonoDevelop) and open in VS, it will compile with .NET framework when I need it to compile with Mono framework. Can you detail your answer? – Cristian M Jan 10 '18 at 13:19
  • So what is your problem. If you need Mono framework, then debug in MonoRemoteDebugger. If you want to use Visual Studio you need to specify .NET framework version in project settings and then rewrite any code that is outdated specific for mono libraries. And use vs – Markiian Benovskyi Jan 10 '18 at 13:22
  • Also when you want to build for release. There should be a build configuration called Release, and change your configuration from Debug to Release – Markiian Benovskyi Jan 10 '18 at 13:23
  • @MarkBenovsky The problem is that when writing in VS, how do I know what code is not specific for Mono libraries (in other words, should I be certain that if I select .NET 4.5 everything I write is compatible with Mono)? On their website it says Mono is compatible up to .NET 4.7, but in Xamarin the latest selectable framework is "Mono / .NET 4.5". – Cristian M Jan 10 '18 at 13:29
  • No. Not everything would be compatible with Mono libraries. In Xamarin you can install additional frameworks I think. Then choose the one you want to build with. Though Mono libraries can have some features not included. So if you want to develop .NET applications it is better to use original VS. Otherwise you can try other languages for Raspberry (Python, Java.. so on) – Markiian Benovskyi Jan 10 '18 at 13:32
  • Nnot every piece of code that compiles for .NET will compile for Mono, since there are lots of Windows-specific things in .NET (not strictly part of C#) that aren't implemented (WPF, ASP.NET async stack) or don't make sense at all in Linux (COM is one such example, I think) – Markiian Benovskyi Jan 10 '18 at 13:33
  • There is an application to let you know if any code you wrote in VS would work after porting to Mono http://www.mono-project.com/archived/moma/ – Markiian Benovskyi Jan 10 '18 at 13:34
  • @MarkBenovsky So you're suggesting to write in Xamarin to be sure I do not have incompatibilities. Other languages are a solution, but it will take some time to learn. MoMA works up to Mono 2.6, unfortunately. – Cristian M Jan 10 '18 at 13:35
  • If you need Mono exactly, you should write in according IDE. Then you will be sure that your code compiles. Mono 4.0 is the most complete with .net features. 4.5 has less. and 4.7 has only c# libraries – Markiian Benovskyi Jan 10 '18 at 13:36
  • "MDebug looks fine, but it is not free." When you already know the answer, why asking? – Lex Li Jan 11 '18 at 03:51
  • @LexLi I hope for a free solution. – Cristian M Jan 11 '18 at 08:47

1 Answers1

0

It seems it is not possible with free software. I can use Visual Studio with MonoRemoteDebugger and if I have doubts about code compatibility, I can build the project in Xamarin which permits targeting Mono.

Cristian M
  • 195
  • 1
  • 1
  • 15