使用 ASP.NET 5 Class 库指定 NuGet 元数据

Specifying NuGet Metadata using ASP.NET 5 Class Library

ASP.NET5 Class 库项目的输出是一个 Nuget 包 (.nupkg)。我的 project.json 文件如下所示:

{
  "version": "1.0.0-*",
  "description": "Provides boilerplate framework code for an ASP.NET MVC project. ASP.NET MVC Boilerplate is a professional template for building secure, fast, robust and adaptable web applications or sites. It provides the minimum amount of code required on top of the default MVC template provided by Microsoft. You can download the ASP.NET MVC Boilerplate project template on the Visual Studio Gallery or download the code on GitHub.",
  "authors": [ "Muhammad Rehan Saeed" ],
  "tags": [ "ASP.NET MVC MVC6 Boilerplate Muhammad Rehan Saeed Framework" ],
  "projectUrl": "https://github.com/RehanSaeed/ASP.NET-MVC-Boilerplate",
  "licenseUrl": "https://github.com/RehanSaeed/ASP.NET-MVC-Boilerplate/blob/master/LICENSE"
  ...omitted
}

似乎没有标题、图标 URL、摘要或发行说明、版权或语言的属性。这些怎么设置?

它们可以像任何其他设置一样设置 属性。以下是支持的内容:https://github.com/aspnet/dnx/blob/dev/src/Microsoft.Framework.Runtime/Project.cs#L223-L238

对于您的具体情况:

Title -> "title"
IconURL -> "iconUrl"
Summary -> "summary"
Release Notes -> "releaseNotes"
Copyright -> "copyright"
Language -> "language"