dotnet-run
See original GitHub issuedotnet-run
NAME dotnet-run – Runs source code ‘in-place’ without any explicit compile or launch commands.
SYNOPSIS dotnet run [options]
DESCRIPTION The run command provides a convenient option to run source code with one command. It compiles source code, generates an output program and then runs that program. This command is useful for fast iterative development and can also be used to run a source-distributed program (e.g. website).
This command relies on the compile command to compile source inputs to a .NET assembly, before launching the program. The requirements for and handling of source inputs for this command are all inhereted from the compile command. The documentation for the compile command provides more information on those requirements.
The native command uses compile in the following way:
dotnet compile -o dotnetapp.exe [overriden defaults from dotnet run]
Output files, including temporary files, are written to the child bin
folder, which will be created if it doesn’t exist. Files will be overwritten as needed.
Options
-v, --verbose Prints verbose logging information, to follow the flow of execution of the command.
Issue Analytics
- State:
- Created 8 years ago
- Comments:22 (21 by maintainers)
Top GitHub Comments
I think we need to treat C# script files as first class citizen in dotnet driver. If one wants to run a C# script file, the most intuitive way is to type run. If we force users to type “dotnet tools csi myscript.csx” then we are just making it too hard for them and .csx files won’t look like first class citizens. Also running a csx files does exactly the same thing as regular run. It builds the file and then runs it. So why should it be different?
With a .csx file, you should be able to just say “dotnet run HelloWorld.csx”. This needs no scaffolding of main or project.json