Search code examples
.net-corecommand-lineconsole-application

How to run .NET Core console application from the command line


I have a .NET Core console application and have run dotnet publish. However, I can't figure out how to run the application from the command line. Any hints?


Solution

  • If it's a framework-dependent application (the default), you run it by dotnet yourapp.dll.

    If it's a self-contained application, you run it using yourapp.exe on Windows and ./yourapp on Unix.

    For more information about the differences between the two app types, see the .NET Core Application Deployment article on .NET documentation.