【问题标题】:Issue when installing DiscordSharp NuGet Package安装 DiscordSharp NuGet 包时的问题
【发布时间】:2016-01-10 18:20:55
【问题描述】:

我已经解决了这个问题,请看我发布的答案

当我尝试使用包管理器控制台安装 DiscordSharp (Github | NuGet) 时遇到问题。

当我使用 Discord Sharp NuGet 页面上显示的安装命令时,我收到以下错误(对于格式设置,请参阅我的评论以获取错误截图):

PM> Install-Package DiscordSharp -Pre
Attempting to resolve dependency 'Newtonsoft.Json (≥ 6.0.0)'.
Install-Package : The element 'metadata' in namespace 'http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd' has invalid child     element 'developmentDependency' in namespace 
'http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd'. List of possible elements expected: 'copyright, tags, description, frameworkAssemblies,
references, dependencies, releaseNotes, language, summary' in namespace 
'http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd'.
At line:1 char:1
+ Install-Package DiscordSharp -Pre
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo: NotSpecified: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

这是我在安装任何其他软件包之前在新项目中遇到的错误,在 DiscordSharp 之前安装 json.net 后我遇到了同样的错误。

如果对我在 Windows 8 上使用 Visual Studio 2012 有帮助的话。

如果我在帖子中遗漏了任何需要的内容,请告诉我。感谢您的帮助!

【问题讨论】:

标签: c# json.net package installation nuget


【解决方案1】:

问题已解决:我的 NuGet 版本已过时,因为我使用的是 Visual Studio 2012。

更新到 Visual Studio 2015 解决了这个问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多