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

devlife picture devlife · Aug 26, 2016 · Viewed 120.8k times · Source

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

Answer

svick picture svick · Aug 26, 2016

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 Docs.