none
.NET Core Cosnsole Apps and MacOS RRS feed

  • Question

  • Hi, sorry if this is in the wrong place I didn't know where to make this post.

    VS says that a .NET Core console app will run on MacOS. Does that mean a mac user can simply double-click the exe file and it will run?

    Thanks

    Monday, February 10, 2020 1:08 PM

Answers

  • Hi Integrater,
    You can execute that app from the command line and run the app in Debug mode using "command + enter" or in Release mode using "option + command + enter".
    You can run it with dotnet, like:

    dotnet myapp.dll

    More details you can refer to those documents.
    [Get started with .NET Core on macOS using Visual Studio for Mac]
    [how do I execute a .net core console app on mac os]
    Hope these are helpful for you.
    Best Regards,
    Daniel Zhang


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Integrater Wednesday, February 12, 2020 10:11 AM
    Tuesday, February 11, 2020 4:02 AM

All replies

  • Bing and Google are your friends.

    https://docs.microsoft.com/en-us/dotnet/core/tutorials/using-on-mac-vs

    https://www.michaelcrump.net/part3-aspnetcore/

    Monday, February 10, 2020 4:35 PM
  • I have developed some .Net Core console programs. I doubt it is possible to simply double-click the exe file to run the program because a .Net Core console program is not an exe; it is a DLL.

    The Microsoft Documentation page linked to in the other reply seems to not help but the michaelcrump.net article does seem to explain what is necessary.

    You did not specify if you are using VS in Windows or in a Mac and I assume the procedure is different for each of them.



    Sam Hobbs
    SimpleSamples.Info

    Monday, February 10, 2020 8:10 PM
  • Hi Integrater,
    You can execute that app from the command line and run the app in Debug mode using "command + enter" or in Release mode using "option + command + enter".
    You can run it with dotnet, like:

    dotnet myapp.dll

    More details you can refer to those documents.
    [Get started with .NET Core on macOS using Visual Studio for Mac]
    [how do I execute a .net core console app on mac os]
    Hope these are helpful for you.
    Best Regards,
    Daniel Zhang


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Integrater Wednesday, February 12, 2020 10:11 AM
    Tuesday, February 11, 2020 4:02 AM