0

When I run

nuget pack myPackage.nuspec

The element 'metadata' in namespace 'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd' has invalid child element 'packageSourceUrl' in namespace 'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd'. List of possible elements expected: 'contentFiles, frameworkAssemblies, references, developmentDependency, language, releaseNotes' in namespace 'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd'.

I understand that the element is invalid and not in the xsd.

My nuspec file has 2 elements in the metadata element that will generate errors when creating the nupkg:

<metadata>      
  <mailingListUrl>http://example.com</mailingListUrl>
  <packageSourceUrl>https://example.com/</packageSourceUrl>

How can I avoid this error with the schema?

p.campbell
  • 98,673
  • 67
  • 256
  • 322

1 Answers1

1

mailingListUrl and packageSourceUrl are not a part of the nuspec metadata element. What are you looking for? The possible nuspec metadata elements are given here.

p.campbell
  • 98,673
  • 67
  • 256
  • 322
Mathivanan KP
  • 1,979
  • 16
  • 25
  • My problem/question stems from the fact that I used a chocolatey nupsec and `nuget pack` didn't understand these chocolatey-specific enhancements – p.campbell Feb 06 '17 at 16:59