dotnet Tools runs dotnet run

Source: Internet
Author: User
Tags dotnet windows x64 windows x86 linux mint

dotnet Tools runs dotnet run

Dotnet Run Command Introduction preface

This article focuses on the system execution process after running dotnet run with dotnet tools in ASP. NET Core. If you feel that it is helpful to you, you may wish to order a "recommendation".

Directory
    • Dotnet Run Introduction
    • Dotnet Run uses
    • dotnet Run Execution process
Dotnet Run Introduction

Dotnet related commands are part of the. NET Core command-line (CLI), Microsoft has provided us with this command-line tool for use in our development program, which is used primarily for compiling code, managing NuGet packages, running programs, Testing and so on.

The Tools tool version is the Preview1 version in the current ASP. RC2 version, and the Tools tool version is Preview2 in the RTM version.

The dotnet command currently supports the operating system or OS version:

    • Ubuntu 14.04/linux Mint 17
    • Ubuntu 16.04
    • Debian 8.2
    • Windows x64
    • Windows x86
    • Mac OS X
    • CentOS 7.1/oracle Linux 7.1
    • RHEL 7.2
    • OpenSUSE 13.2
    • Fedora 23

The following is a list of parameters that the dotnet Run command can use when running a program

dotnet run [--framework] [--configuration] [--project] [--help] [--]

-F,--framework

Run using the provided framework, which is the project.json frameworks node in the corresponding file

-C,--configuration [debug| Release]

Configure whether the environment used is debug or Release, the default is debug mode.

-P,--project [PATH]

Specifies the project to run, which can be a file path, which can be a project.json contained project.json path, and, if not specified, the current path by default.

So when running the dotnet run command, if you want to lazy, do not want to specify -p parameters, the command line working directory is set to the folder path of the project is project.json OK.

Dotnet Run uses

I believe there are friends who have used the development process of Node, Python, GO, Ruby and so on, they will not be unfamiliar with the command line, they can help them to build and build most of the program, and now. NET can be run like these languages by command line, Even more simple than them, simply introduce:

1. Installation
In the Http://www.dot.net site, you can easily see how the dotnet tools are installed between the various platforms.
Open http://www.dot.net, select. NET Core and then step by step.

2. Create a Hello world
You can use dotnet new commands to create a console for the Hello world~

3. compiling and running
Use dotnet run will help you compile and run the Hello World program.

Here's a command line on my Mac:

Main steps:

dotnet new  restore  dotnet run  
dotnet Run Execution process

I already know dotnet. In fact, inside the CLI is a command line tool set. And it's already used dotnet run to run our application, so how does it work inside?

dotnet runcommand is dependent on dotnet build the command, before running the Run command, the system calls the build command to generate the code, when the dotnet build command is run, first detects the existence of a folder in the program, bin if it does not exist, it will be created, and then put the resulting file into bin the Folder. The obj folder then holds the temporary files generated by the program.

One thing to note is that the execution environment of the command is the context of the dotnet run Project code, not the bin or obj folder, and if you need to run a DLL program, use the dotnet command: dotnet xxx.dll instead dotnet run xxx.dll .

dotnet Tools runs dotnet run

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.