(3) Net Core project package management

1. Create a project


 1. How to create a project, refer to the previous article

 

2. Introduction to the program package


 1. The package of Net Core is divided into front and back ends, the back end uses nuget, and the front end uses bower.

2. Different from Net, when Net Core refers to the nuget package, even if the package contains front-end files, it will not import the front-end files, only the dll.

3. CSS and JS components are introduced through bower.

 

Three, nuget package reference


1. The project has been created, and the AspNetCore.All package has been introduced by default. Expand it to see all components.

2. Click: Dependencies -> Manage Nuget Packages to enter the management interface.

3. View: You can view all, installed, and new versions of packages

4. Installation: Take MySql as an example, select the package, select the version, install, and accept the license.

5. View: After the installation is complete, view the results of the installation package.

 

 

 

 

 

 

 

 

 

 

 

 

Fourth, Bower package reference


1. Add two bower configuration files, see the content below. (There is a problem here. After I updated VS to the latest version, I could not add it through the new item. It was possible before. Everyone can think of a way to add it.)

2. After adding the configuration file, right-click on the project -> Manage Bower Packages to enter the management interface.

3. Select the components to be installed, select the version, and install.

4. After installation, check the installation result.

 

 

bower.json file content

{
  "name": "asp.net",
  "private": true,
  "dependencies": {
  }
}

.bowerrc file contents

{
  "directory": "wwwroot/lib"
}

 

 

 

 

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325256683&siteId=291194637