我正在尝试更新 nuget 包以添加一些程序集引用,但出现以下错误:
命名空间 ' 中的元素 'metadata'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd' 命名空间中的子元素 'frameworkAssemblies' 无效http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd'。预期可能元素的列表:命名空间中的“依赖项、语言、摘要”http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd'
我相信这个功能是在 NuGet 1.2 中添加的 - 我正在使用 1.2.2213.45。
这是我的 nuspec 文件:
<?xml version="1.0"?>
<package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<id>PetaPoco.Core</id>
<title>PetaPoco.Core - A tiny ORMish thing for your POCOs (Core Only)</title>
<version>3.0.0</version>
<authors>Topten Software</authors>
<owners>Topten Software</owners>
<licenseUrl>http://www.toptensoftware.com/petapoco/license</licenseUrl>
<projectUrl>http://www.toptensoftware.com/petapoco/</projectUrl>
<iconUrl>http://www.toptensoftware.com/petapoco/nuget_icon.png</iconUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>
PetaPoco is a tiny, single file .NET data access layer inspired by Massive that works with both non-dynamic POCO objects and dynamics.
This package includes the just the core PetaPoco library (ie: no T4 templates)
</description>
<tags>ORM POCO MVC MVC2 MVC3 ASP.NET WebForms WebMatrix MySQL Database</tags>
<frameworkAssemblies>
<frameworkAssembly assemblyName="System.Data" />
<frameworkAssembly assemblyName="System.Configuration" />
</frameworkAssemblies>
</metadata>
<files>
<file src="PetaPoco.cs" target="Content\Models" />
</files>
</package>
我认为您的 nuget.exe 版本已过时。您只需运行“nuget update”,它就会自行更新到最新版本(截至今天为 1.3.20425.372)。然后你的 nuspec 应该可以正常工作了!
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)