To run a .NET Core application, you can use the dotnet run command from the console window. As this command relies on the dotnet build command, when you specify a project to run, it automatically builds the project and then launches the application.
To run an app in the project context, enter the following command:
dotnet run --project <ProjectPath>
If you already have a portable application DLL, then you can run it directly by executing the DLL by the dotnet driver without specifying any command. For example, the following command runs the already available DLL, which was built against .NET Core 1.0:
dotnet "Demo AppinDebug etcoreapp1.0Demo App.dll"
The output is as follows:
As you can now build and run .NET Core applications, it's time for you to learn about how to publish a .NET Core application. In the next section, we are going to discuss this.