nuget 'packages' element is not declared warning

后端 未结 7 1633
猫巷女王i
猫巷女王i 2020-12-07 10:05

not a showstopper but when using nuget in a project, it creates a packages.config file with this shape


相关标签:
7条回答
  • 2020-12-07 11:04

    Actually the correct answer to this is to just add the schema to your document, like so

    <packages xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
    

    ...and you're done :)

    If the XSD is not already cached and unavailable, you can add it as follows from the NuGet console

    Install-Package NuGet.Manifest.Schema -Version 2.0.0
    

    Once this is done, as noted in a comment below, you may want to move it from your current folder to the official schema folder that is found in

    %VisualStudioPath%\Xml\Schemas
    
    0 讨论(0)
提交回复
热议问题