I'm trying to develop a C# Worker Service with .NET Core 3.1 and run it as a service on an Ubuntu machine.
I found this guide to set up Worker Services on Linux, but I'm getting errors (see screenshot) when trying to start the service.
The guide does not specify how to compile the solution for Linux, so I found this post and compiled a package using dotnet build --runtime ubuntu.18.04-x64
. The result is a folder with my Application and no file extension, as well as a long list of .dll files.
Is this the correct way of publishing Worker Services, or generally .NET Core Applications targeting Linux, on a Windows machine? I wasn't able to find any official documentation or other resources on how to properly do this.
I unfortunately can't directly develop on the Ubuntu machine, as it only has a command-line interface.