package-validator icon indicating copy to clipboard operation
package-validator copied to clipboard

Documentation needs links to Package Schema and Schema Examples

Open RickStrahl opened this issue 9 years ago • 5 comments

Since Chocolatey uses a custom NuGet flavor, there really needs to be a page that has the schema listed or at least an example file with all data filled in.

The Package admin page shows a number of useful hints, but it never shows the format of actual tags. Example - there's supposed the be an admin tag - what goes in that? True/False/0/1? Empty tag? No idea. Trying to find more info on the wiki is like finding a needle in a hay stack.

Ideally I'd like to see: Simple example of the tag used in the wiki topic. One or more sample .nuspec files that demonstrate correct usage of tags (with comments for what's required what's optional what's deprecated)

RickStrahl avatar May 16 '16 07:05 RickStrahl

@RickStrahl I think this a good suggestion, and definitely an area that can be improved. I am not sure that this is the right repo to raise this on, but I am sure that @ferventcoder will be able to confirm.

In the interim, have you seen the output from choco new? This has a sample nuspec and .ps1 files, that I think will have at least some of the things that you are looking for.

gep13 avatar May 16 '16 08:05 gep13

Especially choco new in the beta version. It outputs a schema that looks like what you see at https://chocolatey.org/packages/default.template#files

ferventcoder avatar May 16 '16 12:05 ferventcoder

We could list this here, but we should also probably add the schema somewhere and actually have it available. MS doesn't actually publish schemas for NuGet (at least I have not been able to locate them), but perhaps we should.

ferventcoder avatar May 16 '16 12:05 ferventcoder

btw, the offical nuspec(nuget) file schema is available here: https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.Packaging/compiler/resources/nuspec.xsd Unless I'm mistaken, that is the one that is currently used.

AdmiringWorm avatar Mar 05 '17 02:03 AdmiringWorm

Ah, well then. Here is Chocolatey's - https://github.com/chocolatey/nuget-chocolatey/blob/2.11_adds/src/Core/Authoring/nuspec.xsd

ferventcoder avatar Mar 05 '17 17:03 ferventcoder