Powerful function, learn to create your own nuget
In the project, DLL files written by others are used, and the official nuget is quoted
Here you will learn to build your own nuget, use your own nuget, you can store your own DLL, where to use it
Step 1: create your own empty web project, as shown in the following figure:
Only these files will be created after successful creation
Step 2: install the following nuget package nuget.server
Since the installation was successful
Step 4: delete Web.config redundant
Then ctry + F5 starts the project
Step 5: publish this project to the server
In this step, I will not explain the basic skills of the project. The following are the files that have been successfully published and copied to the server
After the successful deployment of the project, there are no restrictions on the access to the local port
Step 6: create a class library locally
The corresponding login method is written
Then build the project
Step 7: Downloadnuget.exefile
Download address https://www.nuget.org/downloads
takenuget.exeCopy the file into the project file
Run CMD in this directory
Run commandnuget pack -version 1.1.0
-Version 1.1.0 can be the specified version and can not be written
A file is then generated
Copy it to thePackagesIn the folder
Copy it into a folder
Step 8:
Then create a console program randomly and follow the figure:
Here is the input of your own nuget website just created
Choose your own nameNuget source
Then install
Writing code
This is from metadata
Here, we succeed with a simple nuget. In the above steps, we build nuget, publish our own DLL, and call our own DLL,
The process of intermediate release and project deployment is omitted. If you don’t understand it, you can comment on it. Thank you for watching