Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
nuspec file reference incorrectly lists minClientVersion as an element rather than attribute #1450
On the page that describes the .nuspec File Reference, the description of "minClientVersion" is listed under the section titled "Optional metadata elements". However, minClientVersion is an XML attribute of the "metadata" XML element, and not an XML element in an of itself.
For a newbie reading the article as-is, one might try adding tags named <minClientVersion>, only to have the nuget pack command return errors, before eventually realizing that it's not actually a valid tag. I'd suggest making another subheading somewhere that describes what the metadata element is, and underneath it describe possible attributes, such as minClientVersion.
Note that this is a duplicate of #607, which has been closed, yet it has not actually been solved.
Yup, the OP is correct.
The minClientVersion belongs on the metadata element:
<?xml version="1.0" encoding="utf-8"?> <package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd"> <metadata minClientVersion="126.96.36.199"> <id>dasdas</id> <version>2.0.0</version> <title /> <authors>dsadas</authors> <owners /> <requireLicenseAcceptance>false</requireLicenseAcceptance> <description>My package description.</description> </metadata> <files> <file src="content\one.txt" target="content\one.txt" /> </files> </package>