How to create Nuget Package from Dll ?

1. Download and save nuget.exe from .

2. Create Manifest file using command : nuget.exe spec . After command execution it generates new file in same folder named as Package.nuspec .

3. Package.nuspec is a xml file with contains various tags and you can configure it according to requirement . Renamed file name here .

Explanation of listed items in file :

  • id: Used to make your package uniquely identified among other NuGet packages .
  • Version: It’s like a serial number in any physical product but virtually versioning is used to display iterative progress in your Dll . E.g.
  • Authors: You to showcase name of author(s) of the package.
  • owners: It can be organization or can be same as author.
  • licenseUrl: We can put here link which navigate to license page for package (if applicable)
  • projectUrl: We can mention project URL from where this dll belongs
  • iconUrl: Image used as an icon for the package.
  • requireLicenseAcceptance: It has Boolean value which indicates that client accept license before installation or not.
  • description: We can mention anything about package.
  • releaseNotes: We can describe what changes we made in published version of package.
  • copyright: We can mention copyright details for package.
  • tags: We can mention multiple keywords belongs to package which is helpful while searching it.
  • dependencies: We can mention list of dlls which are required for installation of package.
  • title: It can any name which defines your nugets capability or workability.
  • files: It can be used to show package content.

4. Run Command : Nuget.exe pack Mynuget.nuspec . In Image you can find output after execution and also Nuget package in folder section named as W3TechSchoolTeam.1.0.0.nupkg .

Leave a Reply