"ASP. NET Core QuickStart" (i) Environment installation

Source: Internet
Author: User
Tags dotnet net command

Download the. NET Core SDK

: Https://www.microsoft.com/net/download/windows

Https://www.microsoft.com/net/learn/get-started/windows

Install vs2017, choose to install core cross-platform when installing

Creating an ASP. NET core application in the console

After the program is installed, you can enter dotnet in the console to create the core application

Enter dotnet--help view command Help

. NET command-line tools (2.1.2) Usage: dotnet [runtime-options] [path-to-application] Usage: dotnet [SDK-options] [command] [arguments] [command-Options]path-to-application: The path to the application. dll file to execute. SDK command:NewInitializes a. NET project.  Restore restores the dependencies specified in the. NET project.  Run compiles and immediately executes the. NET Project.  Build. NET Project.  Publish publishes. NET projects for deployment, including runtime.  Test runs the unit tests using the tests run program specified in the project.  Pack to create a NuGet package.  Migrate migration of Project.json-based projects to MSBuild-based projects.  Clean clears the build output.  SLN modifies the solution (SLN) file.  Add adds a reference to the project.  Remove removes the reference from the project.  List lists the references in the project.  NuGet provides additional nuget commands.  MSBuild runs the Microsoft Build Engine (MSBuild). Vstest run the Microsoft Test Execution command-line tool. Common options:-v|--verbosity Sets the verbosity level of the command.  Allowable values are Q[uiet], M[inimal], N[ormal], d[etailed], and diag[nostic]. -h|--Help displays assistance. Run the dotnet command--Help to get more information about the command. SDK-Options:--Version displays the. NET Core SDK versions. --info displays. NET Core information. -d|--diagnostics enable diagnostic output. Runtime-Options:--additionalprobingpath <path>The path containing the probe policy and assembly to probe. --fx-version <version>the version of the shared framework to be used to run the application's installation. --roll-forward-on-no-candidate-FX has enabled "Do not roll forward to the candidate sharing framework." --additional-deps <path> paths to other Deps.json files.
View Code

Input dotnet New--help view initialize. NET project command Help

PS C:\Users\ Wang Yuting \desktop\demo> dotnetNew--Help welcomes the use of. NET Core!---------------------to learn more about. NET Core, go to https://Aka.ms/dotnet-docs. Use dotnet--help to view available commands or go toHttps://aka.ms/dotnet-cli-docs. Telemetry--------------. NET Core collects usage data to improve the user experience. The data is anonymous and does not contain command-line arguments. Data is collected by Microsoft and shared with the community. You can choose to use your favorite shell to set the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to1to exit telemetry. To learn more about the. NET Core tools Telemetry, visit https://Aka.ms/dotnet-cli-telemetry. Preparing for ... Use case:New[options] Option:-H,--Help displays assistance about this command. -L,--list lists the templates that contain the specified names.  If no name is specified, list all templates. -N,--name of the output being created.  If no name is specified, the name of the current directory is used. -O,--Output where to place the generated outputs. -I.,--Install the source or template package. -U,--Uninstall Uninstall a source or template package. --type filter templates based on the available types. The predefined values are"Project"、"Item"Or" Other". --force forces the content to be generated, even if the content changes existing files. -lang,--language Specifies the language of the template to be created. Use case:New[options] Option:-H,--Help displays assistance about this command. -L,--list lists the templates that contain the specified names.  If no name is specified, list all templates. -N,--name of the output being created.  If no name is specified, the name of the current directory is used. -O,--Output where to place the generated outputs. -I.,--Install the source or template package. -U,--Uninstall Uninstall a source or template package. --type filter templates based on the available types. The predefined values are"Project"、"Item"Or" Other". --force forces the content to be generated, even if the content changes existing files. -lang,--language Specifies the language of the template to be created. Template short name language tag--------------------------------------------------------------------------------------------------------Console Application console [C #], F #, VB Common/Consoleclass Library Classlib [C #], F #, VB Common/libraryunit test Project MSTest [C #], F #, VB test/mstestxunit test Project Xunit [C #], F #, VB test/xunitasp.net Core Empty web [C #], F # Web/emptyasp.net Core Web App (Model-view-controller) MVC [C #], F # web/mvcasp.net Core Web App Razor [C #] Web/mvc/Razor pagesasp.net Core with Angular Angular [C] Web/mvc/spaasp.net Core with React.js React [C #] Web/mvc/spaasp.net Core with React.js and Redux Reactredux [C] Web/mvc/spaasp.net Core web API Webapi [C #], F # Web/WebAPIGlobal. json file Globaljson confignuget Config                          Nugetconfig ConfigWeb Config Webconfig Configsolution File sln Solutionra Zor page page Web/asp.netmvc viewimports viewimports Web/asp.netmvc viewstart Viewstart Web/ASP.NETExamples:dotnetNewMVC--Auth individual dotnetNewClasslib--framework netcoreapp2.0dotnetNew--help
View Code

Creating an MVC project using dotnet new MVC

Now that the project has been created, you can open it with vsual Studio code

We can run the newly created program with Command dotnet.

Access http://localhost:5000 for access

vs2017 Creating a core application

Select: File----NEW----project

Startup does not recommend using IIS, it is recommended to start with the console

"ASP. NET Core QuickStart" (i) Environment installation

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.