question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet-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:closed
  • Created 8 years ago
  • Comments:22 (21 by maintainers)

github_iconTop GitHub Comments

2reactions
ManishJayaswalcommented, Nov 10, 2015

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?

2reactions
ManishJayaswalcommented, Nov 10, 2015

With a .csx file, you should be able to just say “dotnet run HelloWorld.csx”. This needs no scaffolding of main or project.json

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet run command - .NET CLI
The dotnet run command provides a convenient option to run your application from the source code with one command.
Read more >
Running a .NET Project Using the Command Line
To use the command line to run a project for a COBOL application on .NET you use the dotnet run command as follows:...
Read more >
10 commands you don't want to be without in .Net Core
Here's a full list of commands that runs restore implicitly: dotnet new; dotnet build; dotnet build-server; dotnet run; dotnet test; dotnet publish; dotnet...
Read more >
How to run .NET Core console application from the ...
Open a command prompt or terminal window. · Navigate to the directory that contains the compiled executable file of your .NET Core console ......
Read more >
.NET and Visual Studio Code
Select Yes. Run the app by entering the following command in the command shell: dotnet run ... Tasks - Running tasks with Gulp,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found