NuGet框架程序集不起作用 [英] NuGet Framework Assemblies not working

查看:107
本文介绍了NuGet框架程序集不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to update a nuget package to add some assembly references, but I'm getting the following error:

名称空间' 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 '

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

我相信此功能已在NuGet 1.2中添加-我正在使用1.2.2213.45.

I believe this functionality was added in NuGet 1.2 - I'm using 1.2.2213.45.

这是我的nuspec文件:

Here's my nuspec file:

<?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应该可以正常工作!

I think you have an outdated version of nuget.exe. You can simply run 'nuget update' and it will update itself to the latest (which as of today is 1.3.20425.372). Your nuspec should then work fine!

这篇关于NuGet框架程序集不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆