展示 NuGet 包发布说明

18

Nuspec参考文档中有关 releaseNotes 标记的说明:

v1.5 一个描述软件包每个版本所做更改的字段。仅在选择“更新”选项卡且软件包是先前安装软件包的更新时才显示此字段。它显示在通常显示描述的位置。

我创建了两个 nuspec 文件,两个文件都包含(当然具有不同的 version 标记)。

<?xml version="1.0"?>
<package >
  <metadata>
    <id>TestReleaseNotes</id>
    <version>1.0</version>
    <authors>adrianm</authors>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Description</description>
    <releaseNotes>Release notes</releaseNotes>
  </metadata>
  <files>
    <file src="Test.cs" target="content" />
  </files>
</package>

我在VS2013中安装了1.0版本并选择了更新选项卡,但我看不到发行说明。 Nuget update

我错过了什么吗?


对我来说,使用VS 2013和旧版Microsoft.ApplicationInsights安装的NuGet似乎没问题。NuGet对话框显示一个单独的“发布说明”标签,其中包含来自NuGet包的发布说明文本。 - Matt Ward
3个回答

13
我自己发现了这个问题。
如果我从project打开“管理NuGet包”对话框,则会显示发布说明。 manage from project
但是当我从solution打开时就没有显示。
对于我的自有包和nuget.org,行为都是相同的。

11
我使用的是Visual Studio 2015和NuGet 3.3。无论我如何打开它:1)管理NuGet程序包...(对于项目),或2)管理解决方案的NuGet程序包...,我都看不到发布说明。我花了更多时间来寻找更新的发布说明,以便从NuGet获取的任何生产力好处似乎都丧失了!例如,我目前正在尝试查看Microsoft.ApplicationInsights 2.0.0.0的发布说明,但我只能看到描述!有人找到在VS 2015中查看发布说明的方法吗? - KarlZ
7
2020年了,仍然无法在VS 2019中使用。 - 1800 INFORMATION
6
如此重要的软件包管理功能长期以来无法使用/出现故障,这让人难以置信 :/ - Sevenate

6

截至2021年3月,这在Visual Studio 2019仍然是一个问题。我们使用Azure内部发布了许多NuGet包。程序包发布说明出现在Azure UI中,但在Visual Studio中却没有显示。但是,“描述”在Visual Studio中显示,因此我已调整了描述,以包括发布说明。这实际上来自于Directory.build.props文件,但同样可以嵌入项目文件中:

        <PackageReleaseNotes>
Release notes added to .nuspec file as <Release Notes> and also to end of Description
        </PackageReleaseNotes>
        <!-- Don't indent text, it makes it hard to read in the nuget package manager-->
        <Description>
Description:
This is the description of our internally produced nuget package

Release Notes:$(PackageReleaseNotes)
        </Description>

但是,一旦您通过GUI(VS2019/VS2022)第一次编辑说明,占位符$(PackageReleaseNotes)就会消失,因为扩展文本已保存。 - Christoph

5

这在VS2022上仍然不可用。 - undefined

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接