asp.net.netmacos.net-coreself-contained

self-contained ASP.Net Core app doesn't run on Mac


Any idea how I can find the cause of this issue? Mac terminal just responds with "command not found" trying to run an ASP.NET core app published using self-contained deployment.


Solution

  • OK. So to summarize. Microsoft does make .NET Core apps cross platform, but the Windows developers must learn carefully some macOS and Linux ABCs before diving to another operating system.

    Common issues are,

    1. You need to run the program at terminal by calling ./executable_name, and this is a convention.
    2. You need to grant the executable the rights to execute, by calling chmod a+x executable_name (most Linux distributions require this).