NuGet框架程序集无法正常工作

Bra*_*son 18 .net nuget nuspec

我正在尝试更新nuget包以添加一些程序集引用,但是我收到以下错误:

元素命名空间"元数据" 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 '中的'依赖关系,语言,摘要'

我相信这个功能是在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>
Run Code Online (Sandbox Code Playgroud)

Dav*_*bbo 17

我认为你有一个过时的nuget.exe版本.你可以简单地运行'nuget update',它会自动更新到最新版本(截至今天是1.3.20425.372).你的nuspec应该工作正常!