0

I've created a new solution with 2 class libraries and 1 console app for testing the 2 class libraries. I want to create a NuGet package for the solution so other apps can use the 2 class libraries.

I don't think the tester console app would be needed in the NuGet package because apps would be using the functionality in the 2 class libraries and I don't even think that using a console app in a NuGet package would be a valid use case scenario. So what would be the proper and easiest way for me to create a NuGet package for these 2 class libraries?

4

1 回答 1

0

首先,如果这两个库永远不会与另一个分开使用;他们可能应该只是一个图书馆。

除此之外:

  1. 您要上传到 Nuget 的每个“事物”(习惯上,每个项目)都需要一个 nuspec 文件 ( nuget spec)
  2. 使用 .nupkg 创建 .nupkg 文件nuget pack
  3. 使用 发布到 nuget 提要nuget push

完整文档: https ://docs.microsoft.com/en-us/nuget/tools/nuget-exe-cli-reference

于 2018-05-30T16:34:09.997 回答