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

时间:2015-06-23 13:19:24

标签: c# asp.net asp.net-mvc asp.net-core asp.net-core-mvc

ASP.NET 5类库项目的输出是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,摘要或发行说明,版权或语言的属性。怎么设置这些?

1 个答案:

答案 0 :(得分:2)

它们可以像任何其他属性一样设置。以下是支持的内容: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"