.\" Automatically generated by Pandoc 2.1.3 .\" .TH "dotnet run command \- .NET Core CLI" "1" "" "" ".NET Core" .hy .SH dotnet run .PP .SH NAME .PP \f[C]dotnet\ run\f[] \- Runs source code without any explicit compile or launch commands. .SH SYNOPSIS .SS .NET Core 2.x .IP .nf \f[C] dotnet\ run\ [\-c|\-\-configuration]\ [\-f|\-\-framework]\ [\-\-force]\ [\-\-launch\-profile]\ [\-\-no\-build]\ [\-\-no\-dependencies]\ [\-\-no\-launch\-profile]\ [\-\-no\-restore]\ [\-p|\-\-project]\ [\-\-runtime]\ [[\-\-]\ [application\ arguments]] dotnet\ run\ [\-h|\-\-help] \f[] .fi .SS .NET Core 1.x .IP .nf \f[C] dotnet\ run\ [\-c|\-\-configuration]\ [\-f|\-\-framework]\ [\-p|\-\-project]\ [[\-\-]\ [application\ arguments]] dotnet\ run\ [\-h|\-\-help] \f[] .fi .PP * * * * * .SH DESCRIPTION .PP 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//\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\ \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. .PP In order 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. Because it uses cached dependencies, it's not recommended to use \f[C]dotnet\ run\f[] to run applications in production. Instead, create a deployment using the \f[C]dotnet\ publish\f[] command and deploy the published output. .PP .SH OPTIONS .SS .NET Core 2.x .PP \f[C]\-\-\f[] .PP Delimits arguments to \f[C]dotnet\ run\f[] from arguments for the application being run. All arguments after this one 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\ \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. This is equivalent to deleting \f[I]project.assets.json\f[]. .PP \f[C]\-h|\-\-help\f[] .PP Prints out a short help for the command. .PP \f[C]\-\-launch\-profile\ \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. .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 attempt to use \f[I]launchSettings.json\f[] to configure the application. .PP \f[C]\-\-no\-restore\f[] .PP Doesn't perform an implicit restore when running the command. .PP \f[C]\-p|\-\-project\ \f[] .PP Specifies the path of the project file to run (folder name or full path). It defaults to the current directory if not specified. .PP \f[C]\-\-runtime\ \f[] .PP Specifies the target runtime to restore packages for. For a list of Runtime Identifiers (RIDs), see the RID catalog. .SS .NET Core 1.x .PP \f[C]\-\-\f[] .PP Delimits arguments to \f[C]dotnet\ run\f[] from arguments for the application being run. All arguments after this one 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\ \f[] .PP Builds and runs the app using the specified framework. The framework must be specified in the project file. .PP \f[C]\-h|\-\-help\f[] .PP Prints out a short help for the command. .PP \f[C]\-p|\-\-project\ \f[] .PP Specifies the path and name of the project file. (See the NOTE.) It defaults to the current directory if not specified. .RS .PP [!NOTE] Use the path and name of the project file with the \f[C]\-p|\-\-project\f[] option. A regression in the CLI prevents providing a folder path with .NET Core SDK 1.x. For more information about this issue, see dotnet run \-p, can not start a project (dotnet/cli #5992). .RE .PP * * * * * .SH EXAMPLES .PP Run the project in the current directory: .PP \f[C]dotnet\ run\f[] .PP Run the specified project: .PP \f[C]dotnet\ run\ \-\-project\ /projects/proj1/proj1.csproj\f[] .PP 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): .PP \f[C]dotnet\ run\ \-\-configuration\ Release\ \-\-\ \-\-help\f[] .PP 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): .PP \f[C]dotnet\ run\ \-\-verbosity\ m\f[] .SH AUTHORS mairaw.