Nuget错误'ns:未找到XML文件中的package / ns:metadata / ns:id'

时间:2013-12-05 03:15:56

标签: tfs nuget nuget-package

在我的构建中运行nuget来创建一个包时,我得到:

'ns:未找到XML文件中的package / ns:metadata / ns:id'

enter image description here

我的NSPec是由

生成的
  

nuget spec [应用程序名称]

返回

    <?xml version="1.0"?>
<package >
  <metadata>
    <id>E.Commerce.Site</id>
    <version>1.0.0</version>
    <authors>administrator</authors>
    <owners>administrator</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>description</description>
    <releaseNotes>release of the package.</releaseNotes>
    <copyright>Copyright 2013</copyright>
    <tags>ESITE</tags>
    <dependencies>
      <dependency id="SampleDependency" version="1.0" />
    </dependencies>
  </metadata>
</package>

1 个答案:

答案 0 :(得分:0)

xmlns是运行此工具所必需的,当nuget.exe生成NSPEC时不包含xmlns

通知:  的的xmlns =“http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd

    <?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd>
  <metadata>
    <id>E.Commerce.Site</id>
    <version>1.0.0</version>
    <authors>administrator</authors>
    <owners>administrator</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>description</description>
    <releaseNotes>release of the package.</releaseNotes>
    <copyright>Copyright 2013</copyright>
    <tags>ESITE</tags>
    <dependencies>
      <dependency id="SampleDependency" version="1.0" />
    </dependencies>
  </metadata>
</package>