简体   繁体   English

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

[英]Specifying NuGet Metadata using ASP.NET 5 Class Library

The output of an ASP.NET 5 Class Library Project is a Nuget Package (.nupkg). ASP.NET 5类库项目的输出是Nuget包(.nupkg)。 My project.json file is shown below: 我的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
}

There does not seem to be properties for the Title, Icon URL, Summary or Release Notes, Copyright or Language. 标题,图标URL,摘要或发行说明,版权或语言似乎没有属性。 How can these be set? 如何设置?

They can be set just like any other property. 可以像设置其他属性一样设置它们。 Here's what's supported: https://github.com/aspnet/dnx/blob/dev/src/Microsoft.Framework.Runtime/Project.cs#L223-L238 支持的内容如下: https : //github.com/aspnet/dnx/blob/dev/src/Microsoft.Framework.Runtime/Project.cs#L223-L238

For your particular case: 对于您的特定情况:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM