This article is a mirror article of machine translation, please click here to jump to the original article.

View: 35391|Reply: 2

[Tips] Nuget packages multiple libraries into a package

[Copy link]
Posted on 2021-5-19 16:05:35 | | | |
NuGet supports packaging multiple libraries into a package, which simply means packaging dependencies as well.
First, I created two new class library projects, namely ClassLibrary2 and ClassLibrary3, which will reference the ClassLibrary3 class library, as shown in the figure below:



Package ClassLibrary2 into a nuget package (and package the referenced dependencies with the following command):

ClassLibrary2.1.0.0.nupkg changes the suffix to zip format and opens it, and you can see that the \lib\netcoreapp3.1 folder contains the dependent dlls, as shown in the figure below:



Push to a private nuget repository, as shown below:



After creating a new console application and installing ClassLibrary2 using the Install-Package command, it can successfully call its dependent packages as follows:









Previous:Close Quartz . .Net
Next:Swagger Can't use schemaId xx for type xx. The same schemaId is already ...
Posted on 2022-7-26 14:27:32 |
ssssssssssssss
Posted on 2023-3-30 12:11:15 |
11111111111
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com