Delving into the command line, you can use a few more advanced tools to view every single process running on the Mac, ranging from basic user-level apps to even the tiny daemons and core system functions that are otherwise hidden from Mac OS X’s general user experience. In the Terminal app on your Mac, press the Up Arrow key. The last command you entered appears on the command line. Continue pressing the Up Arrow key until you.
-->
This article applies to: ✔️ .NET Core 2.x SDK and later versions
Namedotnet run - Runs source code without any explicit compile or launch commands.
Synopsis![]() Description
The
dotnet run command provides a convenient option to run your application from the source code with one command. It's useful for fast iterative development from the command line. The command depends on the dotnet build command to build the code. Any requirements for the build, such as that the project must be restored first, apply to dotnet run as well.
Output files are written into the default location, which is
bin/<configuration>/<target> . For example if you have a netcoreapp2.1 application and you run dotnet run , the output is placed in bin/Debug/netcoreapp2.1 . Files are overwritten as needed. Temporary files are placed in the obj directory.
If the project specifies multiple frameworks, executing
dotnet run results in an error unless the -f|--framework <FRAMEWORK> option is used to specify the framework.
The
dotnet run command is used in the context of projects, not built assemblies. If you're trying to run a framework-dependent application DLL instead, you must use dotnet without a command. For example, to run myapp.dll , use:
For more information on the
dotnet driver, see the .NET Core Command Line Tools (CLI) topic.
Show Running App Mac
To run the application, the
dotnet run command resolves the dependencies of the application that are outside of the shared runtime from the NuGet cache. Because it uses cached dependencies, it's not recommended to use dotnet run to run applications in production. Instead, create a deployment using the dotnet publish command and deploy the published output.
Implicit restore
You don't have to run
dotnet restore because it's run implicitly by all commands that require a restore to occur, such as dotnet new , dotnet build , dotnet run , dotnet test , dotnet publish , and dotnet pack . To disable implicit restore, use the --no-restore option.
The
dotnet restore command is still useful in certain scenarios where explicitly restoring makes sense, such as continuous integration builds in Azure DevOps Services or in build systems that need to explicitly control when the restore occurs.
For information about how to manage NuGet feeds, see the
dotnet restore documentation.
This command supports the
dotnet restore options when passed in the long form (for example, --source ). Short form options, such as -s , are not supported.
Options
Examples
Installing Flask installs the
flask script, a Click command lineinterface, in your virtualenv. Executed from the terminal, this script givesaccess to built-in, extension, and application-defined commands. The --help option will give more information about any commands and options.
Application Discovery¶
The
flask command is installed by Flask, not your application; it must betold where to find your application in order to use it. The FLASK_APP environment variable is used to specify how to load the application.
Mac Running App From Command Line Download
Unix Bash (Linux, Mac, etc.):
Windows CMD:
Windows PowerShell:
While
FLASK_APP supports a variety of options for specifying yourapplication, most use cases should be simple. Here are the typical values:
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |