The \f[C]dotnet\ run\f[] 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 \f[C]dotnet\ build\f[] command to build the code.
Any requirements for the build, such as that the project must be restored first, apply to \f[C]dotnet\ run\f[] as well.
.PP
Output files are written into the default location, which is \f[C]bin/<configuration>/<target>\f[].
For example if you have a \f[C]netcoreapp1.0\f[] application and you run \f[C]dotnet\ run\f[], the output is placed in \f[C]bin/Debug/netcoreapp1.0\f[].
Files are overwritten as needed.
Temporary files are placed in the \f[C]obj\f[] directory.
.PP
If the project specifies multiple frameworks, executing \f[C]dotnet\ run\f[] results in an error unless the \f[C]\-f|\-\-framework\ <FRAMEWORK>\f[] option is used to specify the framework.
.PP
The \f[C]dotnet\ run\f[] 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 \f[C]myapp.dll\f[], use:
.IP
.nf
\f[C]
dotnet\ myapp.dll
\f[]
.fi
.PP
For more information on the \f[C]dotnet\f[] driver, see the .NET Core Command Line Tools (CLI) topic.
To run the application, the \f[C]dotnet\ run\f[] command resolves the dependencies of the application that are outside of the shared runtime from the NuGet cache.
Delimits arguments to \f[C]dotnet\ run\f[] from arguments for the application being run.
All arguments after this delimiter are passed to the application run.
.PP
\f[C]\-c|\-\-configuration\ {Debug|Release}\f[]
.PP
Defines the build configuration.
The default value is \f[C]Debug\f[].
.PP
\f[C]\-f|\-\-framework\ <FRAMEWORK>\f[]
.PP
Builds and runs the app using the specified framework.
The framework must be specified in the project file.
.PP
\f[C]\-\-force\f[]
.PP
Forces all dependencies to be resolved even if the last restore was successful.
Specifying this flag is the same as deleting the \f[I]project.assets.json\f[] file.
.PP
\f[C]\-h|\-\-help\f[]
.PP
Prints out a short help for the command.
.PP
\f[C]\-\-launch\-profile\ <NAME>\f[]
.PP
The name of the launch profile (if any) to use when launching the application.
Launch profiles are defined in the \f[I]launchSettings.json\f[] file and are typically called \f[C]Development\f[], \f[C]Staging\f[], and \f[C]Production\f[].
For more information, see Working with multiple environments.
.PP
\f[C]\-\-no\-build\f[]
.PP
Doesn't build the project before running.
It also implicit sets the \f[C]\-\-no\-restore\f[] flag.
.PP
\f[C]\-\-no\-dependencies\f[]
.PP
When restoring a project with project\-to\-project (P2P) references, restores the root project and not the references.
.PP
\f[C]\-\-no\-launch\-profile\f[]
.PP
Doesn't try to use \f[I]launchSettings.json\f[] to configure the application.
.PP
\f[C]\-\-no\-restore\f[]
.PP
Doesn't execute an implicit restore when running the command.
.PP
\f[C]\-p|\-\-project\ <PATH>\f[]
.PP
Specifies the path of the project file to run (folder name or full path).
If not specified, it defaults to the current directory.
.PP
\f[C]\-\-runtime\ <RUNTIME_IDENTIFIER>\f[]
.PP
Specifies the target runtime to restore packages for.
For a list of Runtime Identifiers (RIDs), see the RID catalog.
.PP
\f[C]\-v|\-\-verbosity\ <LEVEL>\f[]
.PP
Sets the verbosity level of the command.
Allowed values are \f[C]q[uiet]\f[], \f[C]m[inimal]\f[], \f[C]n[ormal]\f[], \f[C]d[etailed]\f[], and \f[C]diag[nostic]\f[].
Launch profiles are defined in the \f[I]launchSettings.json\f[] file and are typically called \f[C]Development\f[], \f[C]Staging\f[], and \f[C]Production\f[].
Run the project in the current directory (the \f[C]\-\-help\f[] argument in this example is passed to the application, since the \f[C]\-\-\f[] argument is used):
Restore dependencies and tools for the project in the current directory only showing minimal output and then run the project: (.NET Core SDK 2.0 and later versions):