1

Over the last year I've written a Visial Basic console app using Visual Studio 2019 and wondered not too long ago if it was possible to port it to Linux (Ubuntu 20.4 to start with). After doing a bit of googling, it seemed like it might work - just needed to port from .NET Framework 4.6 to .NET 5. Tried to suggested Microsoft method - failed big time. Did it myself by copy-paste plus a few small changes - works a treat.

My issue now is that I'd like my console app to be deployable/installable using a single installer. So far I've found a few bits on the interwebs but, me being a self confessed noob at the linux game (I can use it, but never in my life coded for it), I've elected to try and do the compiling on my windows machine.

Is this the best approach and does anyone know the dotnet command I need to compile it for ubuntu with all dependencies? I've found a few commands here and there, but they don't appear to work.

Banedon
  • 11
  • 1
  • Ok found this about a second after I posted: https://stackoverflow.com/questions/46843863/how-to-run-a-net-core-console-application-on-linux I got that working, although it doesn't appear to ahve wrapped everything up. If I try copying just the app file which you launch it complains about the associated .dll. – Banedon May 02 '21 at 12:48
  • As a test I wrote a Hello World program in VB and published it with: "dotnet publish -c release -r ubuntu.20.04-x64 --self-contained true" 1) It's not all wrapped up into one file. Have I misunderstood and can only be zipped etc? 2) The project size is 71MB in this form. I know some dependencies will bloat it, but 71MB is a tad over the top. – Banedon May 02 '21 at 13:50

0 Answers0