{"id":22873696,"url":"https://github.com/nullean/nupkg-validator","last_synced_at":"2025-05-06T18:50:51.808Z","repository":{"id":44772598,"uuid":"262049982","full_name":"nullean/nupkg-validator","owner":"nullean","description":"A tool to examine nuget packages to make sure they are release worthy","archived":false,"fork":false,"pushed_at":"2025-02-27T10:28:38.000Z","size":53,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T05:07:34.657Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nullean.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-07T12:55:05.000Z","updated_at":"2025-02-27T10:26:46.000Z","dependencies_parsed_at":"2024-06-21T18:55:28.253Z","dependency_job_id":"08a00f9a-92b3-4211-8492-3c1f0eca5979","html_url":"https://github.com/nullean/nupkg-validator","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullean%2Fnupkg-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullean%2Fnupkg-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullean%2Fnupkg-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nullean%2Fnupkg-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nullean","download_url":"https://codeload.github.com/nullean/nupkg-validator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252750342,"owners_count":21798685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-13T14:29:54.077Z","updated_at":"2025-05-06T18:50:51.785Z","avatar_url":"https://github.com/nullean.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp\u003e\n\u003cimg align=\"right\" src=\"nuget-icon.png\"\u003e  \n\n# nupkg-validator\n\u003c/p\u003e\n\nInspect and validate the contents of your NuGet packages before you push them out in the world.\n\nAvailable inspections\n\n- Inspects that all dlls are build in `Release` configuration\n- Inspects version numbers of dlls inside the nuget package.\n- Inspect that dlls have the right public key token applied\n\nThe tool will also emit all metadata in a way that its easy unleash your own bash/powershell/scripting skills\nagainst standard out.\n\n## Installation\n\n\nDistributed as a .NET tool so install using the following\n\n```\ndotnet tool install nupkg-validator\n```\n\n## Run \n\n```bat\ndotnet nupkg-validator \n```\n\nYou can omit `dotnet` if you install this as a global tool\n\n```bat\nUSAGE: nupkg-validator [--help] [--assemblynametolookfor \u003cstring\u003e] [--dllstoskip \u003cstring\u003e]\n                       [--expectedversion \u003cstring\u003e] [--notmajoronly \u003cbool\u003e] [--publickey \u003cstring\u003e]\n                       [--nodependencies \u003cbool\u003e] \u003cstring\u003e\n\nNUGETPACKAGEPATH:\n\n  \u003cstring\u003e             Specify the path to the nuget package\n\nOPTIONS:\n\n  --assemblynametolookfor, -a \u003cstring\u003e\n        Filter for dll(s) with this AssemblyName\n  --dllstoskip, -d \u003cstring\u003e\n        Filter, comma separated list of strings of dlls file names to skip, defaults to none\n  --expectedversion, -v \u003cstring\u003e\n        Assert that this version number was set properly on the dlls\n  --notmajoronly, -n \u003cbool\u003e\n        Assert AssemblyVersion is the --expectedversion, by default we assert its MAJOR.0.0.0\n  --publickey, -k \u003cstring\u003e\n        Assert this public key token makes it way on the AssemblyName for the dlls\n  --nodependencies \u003cbool\u003e\n        Assert the package has NO dependencies\n  --help                display this list of options.\n```\n\n#### Examples:\n\nPrint out nuspec and dll metadata information.\n\nBy default the tool inspects all dlls for Release mode. There is no toggle to turn this of. Feel free to open an issue\nwith your usecase if you need this.\n\n```bat\ndotnet nupkg-validator  build/output/nupkg-validator*.nupkg  \n```\n\ntruncated output example:\n\n```\nTemp output folder: /tmp/nupkg-validator.0.2.1-canary.0.9\n\n[nuspec] file: /tmp/nupkg-validator.0.2.1-canary.0.9/nupkg-validator.nuspec\n[nuspec] namespace: http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd\n[metadata] id: nupkg-validator \n[metadata] version: 0.2.1-canary.0.9 \n[metadata] title: nupkg-validator: a dotnet tool to validate NuGet packages \n[metadata] authors: nupkg-validator \n[metadata] owners: nupkg-validator \n...\n[dll] tools/netcoreapp3.1/any/nupkg-validator.dll\n[dll] nupkg-validator, Version=0.0.0.0, Culture=neutral, PublicKeyToken=96c599bbe3e70f5d\n[version] Assembly: 0.0.0.0\n[version] AssemblyFile: 0.2.1.0\n[version] Informational: 0.2.1-canary.0.9\n```\n\n##### Validate version\n\n```bat\ndotnet nupkg-validator  build/output/nupkg-validator*.nupkg -v 0.2.1-canary.0.9\n```\n\nAsserts best practices are being [followed around open source libraries](https://docs.microsoft.com/en-ca/dotnet/standard/library-guidance/versioning#version-numbers)\n\n```\n[version] Assembly: 0.0.0.0\n[version] AssemblyFile: 0.2.1.0\n[version] Informational: 0.2.1-canary.0.9\n```\n\nNoteworthy is that the `AssemblyVersion` is expected to be `Major.0.0.0`, if you don't follow this pattern use `--notmajoronly`\n\n```bat\ndotnet nupkg-validator  build/output/nupkg-validator*.nupkg -v 0.2.1-canary.0.9 --notmajoronly true\n```\n\n##### Validate strong name\n\n```bat\ndotnet nupkg-validator  build/output/nupkg-validator*.nupkg -k 96c599bbe3e\n```\n\nAsserts `PublicKeyToken=96c599bbe3e` is part of the full assembly name\n\n##### Validate no nuget dependencies\n\nA flag to fail the tool if the nuspec file declares dependencies to other NuGet packages.\n\n```bat\ndotnet nupkg-validator  build/output/nupkg-validator*.nupkg --nodependencies true\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullean%2Fnupkg-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnullean%2Fnupkg-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullean%2Fnupkg-validator/lists"}