. Net core project file structure analysis, core analysis
1: launch. json (used for configuration debugging)
This file is the configuration file used to start debugging for projects created through vs code;
(By default, vscode supports nodejs debugging)
To debug and debug c # code, install the C # Plug-in and select. NET Core for debugging;
Program needs to be configured to the running directory dll;
Type: the debugging Type of the configuration, coreclr->. NetCore CLR;
Request: attach (to process) or launch (directly start the application );
PreLaunchTask: what needs to be done before debugging is started (configured in task. json), which is generally build (compiled before debugging );
2: tasks. json
Some predefined tasks configured (which should be used for launch. json );
3: wwwroot
Store site resource files such as js css image (similar to the previous. net Content folder );
4:. bowerrc
The front-end package management artifact, which configures the path for storing Referenced File resources;
5: appsettings. Development. json (Development Environment)
Similar to the previous web. config and appsetting. config (it seems that the object needs to be defined to map the value of appsetting );
The content for obtaining the configuration value also changes;
6: etettings. json (production environment)
7: bower. json
The front-end package manager can configure reference for front-end resources such as bootstrap and JQuery. The configuration content will be placed in the folder directory configured by. bowerrc;
8: bundleconfig. json
Compress and package scripts and Css files like BundleConfig. cs of mvc;
9: Program. cs
The Main method is the start entry of the entire project. In the middle, it will enter Startup for site Initialization Configuration;
Create a. netcore dependent Host object, WebHostBuilder. Once the run method of this object is executed, the. netcore program starts;
10: Startup. cs (these three methods are mandatory)
Startup: initialization;
ConfigureServices: Register components required by the project with the IOC container;
Configure: Configure registration events, such as routing configuration;
11:. csproj
The configuration file of the project includes the. netcore version of the current project and the referenced nuget package information;
In. net core 1.0,. netcore used the project. json file. In 1.1, it switched back to The. csproj project file;
12: launchsettings. json (only available in vscode)
Project release information. Whether to use iis or the default address and port number is the same as the previous right-click attribute;