user9393635
user9393635

Reputation: 1429

what would the proper and easiest way to add these files to a nuget package via nuget package explorer?

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?

Upvotes: 0

Views: 40

Answers (1)

BradleyDotNET
BradleyDotNET

Reputation: 61349

First off, if the two libraries will never be used separatly from the other; they should probably just be one library.

Beyond that:

  1. Each "thing" you want to upload to Nuget (idiomatically, each project) will need a nuspec file (nuget spec)
  2. Create the .nupkg filees with nuget pack.
  3. Publish to a nuget feed with nuget push.

Full Docs: https://learn.microsoft.com/en-us/nuget/tools/nuget-exe-cli-reference

Upvotes: 0

Related Questions