豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Freshness Edit: NuGet#3554

Open
JKirsch1 wants to merge 8 commits intoNuGet:mainfrom
JKirsch1:refresh-publishing-quickstart-for-visual-studio
Open

Freshness Edit: NuGet#3554
JKirsch1 wants to merge 8 commits intoNuGet:mainfrom
JKirsch1:refresh-publishing-quickstart-for-visual-studio

Conversation

@JKirsch1
Copy link
Copy Markdown
Contributor

This PR contains freshness updates to Quickstart: Create and publish a NuGet package using Visual Studio (Windows only):

  • Six images updated, one image added, no images removed, six include files updated, one other file updated.
  • For request details, see 558386.

@learn-build-service-prod
Copy link
Copy Markdown

Learn Build status updates of commit a4daeab:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
docs/quickstart/create-and-publish-a-package-using-visual-studio.md ❌Error Details

docs/quickstart/create-and-publish-a-package-using-visual-studio.md

  • Line 245, Column 1: [Error: invalid-image] Attribute "lightbox" specified multiple times.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@learn-build-service-prod
Copy link
Copy Markdown

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@JKirsch1 JKirsch1 marked this pull request as ready for review April 15, 2026 20:15
@JKirsch1 JKirsch1 requested review from a team as code owners April 15, 2026 20:15
Copilot AI review requested due to automatic review settings April 15, 2026 20:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refreshes the NuGet Visual Studio quickstart content by updating screenshots and modernizing the accompanying publishing guidance and UI instructions.

Changes:

  • Updated multiple quickstart screenshots and switched several Markdown image references to :::image directives with improved alt text.
  • Refreshed publishing guidance (API key creation, push command examples, and post-publish management steps).
  • Expanded the Visual Studio quickstart with additional guidance (package ID uniqueness, packing/publishing notes, and adding README/other content).

Reviewed changes

Copilot reviewed 8 out of 15 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
docs/quickstart/media/qs-create-vs-unlist-package.png Updated screenshot for unlisting a package.
docs/quickstart/media/qs-create-vs-generate-on-build.png Updated screenshot for “Generate NuGet package on build”.
docs/quickstart/media/qs-create-vs-edit-package.png Updated screenshot for editing a package listing.
docs/quickstart/media/qs-create-not-indexed.png Updated screenshot for “not indexed yet” message.
docs/quickstart/media/qs-create-api-key.png Updated screenshot for creating/copying an API key.
docs/quickstart/includes/publish-notes.md Updated publishing notes wording and hosting-feeds link text.
docs/quickstart/includes/publish-manage.md Refreshed manage-package instructions and converted images to :::image.
docs/quickstart/includes/publish-errors.md Reworked publishing error explanations and examples.
docs/quickstart/includes/publish-dotnet.md Updated dotnet nuget push example to use placeholders and refreshed output.
docs/quickstart/includes/publish-api-key.md Refreshed API key creation steps and converted image to :::image.
docs/quickstart/includes/publish-api-key-with-link.md Updated link text for scoped API keys.
docs/quickstart/create-and-publish-a-package-using-visual-studio.md Main quickstart refresh: prerequisites, VS UI steps, packing/publishing flow, and added README/content section.
docs/nuget-org/Publish-a-package.md Added note about publishing to the nuget.org test site.

Comment on lines +3 to +5
> - Nuget.org scans all uploaded packages for viruses and rejects any packages that contain viruses. Nuget.org also scans all existing listed packages periodically.
>
> - Packages you publish to nuget.org are publicly visible to other developers unless you unlist them. To host packages privately, see [Host your own NuGet feeds](../../hosting-packages/overview.md).
> - Packages you publish to nuget.org are publicly visible to other developers unless you unlist them. To host packages privately, see [Hosting your own NuGet feeds](../../hosting-packages/overview.md).
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The NOTE text uses inconsistent casing for the site name ("Nuget.org"), and the link target uses the wrong filename casing. In this repo the site is referenced as "nuget.org" elsewhere, and the target file is docs/hosting-packages/Overview.md, so the link should use ../../hosting-packages/Overview.md to avoid broken links on case-sensitive builds.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit 4309ef6 corrects the capitalization in the link address. The inconsistent casing of "Nuget.org" is correct, because when the site name appears at the beginning of a sentence, it should be capitalized.

Comment on lines +9 to +16
For example, suppose the identifier `Contoso.App.Logger.Test` exists on nuget.org. If you try to publish a package with that identifier, you get the following error:

```output
Response status code does not indicate success: 409 (A package with ID 'Contoso.App.Logger.Test' and version '1.0.0' already exists and cannot be modified.).
```

To address this problem, change the package identifier to be unique, rebuild the project, re-create the *.nupkg* file, and retry the `push` command.

Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 409 example/error description is incorrect: a 409 occurs when a package with the same ID and version already exists (or you're attempting to overwrite an existing version), not merely because the package ID exists. The suggested fix should be to increment the version (or push a new version you own) rather than changing the package identifier.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still working on fixing this problem.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit 75bd6ce fixes this problem.

Comment on lines +2 to +3
title: "Quickstart: Create and Publish a NuGet Package Using Visual Studio (Windows Only)"
description: In this quickstart, find out how to use Visual Studio to create a basic NuGet package and then use the command line to publish the package to nuget.org.
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The frontmatter title is in Title Case and no longer matches the H1. Other quickstarts in this repo keep title and the H1 aligned and in sentence case (for example, docs/quickstart/create-and-publish-a-package-using-the-dotnet-cli.md:2,10). Consider reverting to sentence case and keeping the same wording as the H1 to avoid inconsistent titles in navigation/search.

Suggested change
title: "Quickstart: Create and Publish a NuGet Package Using Visual Studio (Windows Only)"
description: In this quickstart, find out how to use Visual Studio to create a basic NuGet package and then use the command line to publish the package to nuget.org.
title: "Quickstart: Create and publish a NuGet package using Visual Studio (Windows only)"
description: In this quickstart, find out how to use Visual Studio to create a basic NuGet package and then use the command line to publish the package to nuget.org.
ai-usage: ai-generated

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the current guidelines, the metadata title should be in title case, and the H1 should use sentence-style capitalization.

Comment on lines 27 to 28
For Visual Studio 2017 and later, the .NET CLI is automatically installed with any .NET-related workload. You can also install the [.NET SDK](https://dotnet.microsoft.com/download) to get the .NET CLI. The .NET CLI is required for .NET projects that use the [SDK-style format](../resources/check-project-format.md) (and an `SDK` attribute). The default .NET class library template in Visual Studio 2017 and later uses the `SDK` attribute.

Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This refers to an SDK attribute, but the SDK-style project attribute is Sdk on the <Project> element and the repo consistently calls it the “SDK attribute” without backticks (for example, docs/resources/check-project-format.md:12,28). Updating the casing/terminology here will avoid confusing readers who look for an SDK attribute literally.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit 4309ef6 removes the backticks to eliminate the confusion and inconsistency.

Comment on lines +40 to 41
1. In Visual Studio, select **File** > **New** > **Project/Solution**.

Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The menu path File > New > Project/Solution is inconsistent with other Visual Studio quickstarts in this repo, which use File > New > Project (for example, docs/quickstart/install-and-use-a-package-in-visual-studio.md:33 and docs/quickstart/create-and-publish-a-package-using-visual-studio-net-framework.md:32). Unless the UI has changed specifically for this scenario, align the wording to match the standard menu path to reduce confusion.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The UI has changed. The menu path in this PR matches the current UI.

Comment on lines +54 to 55
If you're unsure which framework to select, the latest is a good choice, and can be easily changed later. For information about which framework to use, see [When to target `netx.0` vs. `netstandard`](/dotnet/standard/net-standard#when-to-target-netx0-vs-netstandard).

Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

netx.0 isn’t a valid target framework moniker, so the link text is misleading. Consider using a real example TFM (for example, net8.0) or phrasing the link text generically (for example, “When to target .NET vs. .NET Standard”) while keeping the same link target.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link text matches the heading in the linked article.

Comment on lines 177 to 178
1. Run the following command. Replace `<package-file>` with the name of your *.nupkg* file, and replace `<API-key>` with your API key. The package file has the format *\<package-ID\>.version.nupkg*, for example, *Contoso.App.Logger.Test.1.0.0.nupkg*.

Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package file naming pattern is written as *<package-ID>.version.nupkg*, but the actual convention is *<package-ID>.<version>.nupkg* (dot before the version number). Updating this prevents readers from misinterpreting the literal filename format.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit 4309ef6 adds angle brackets around "version."

Comment on lines +268 to +274
To find out how to create a NuGet package with the Visual Studio .NET Framework, see [Create a package using the nuget.exe CLI](../create-packages/creating-a-package.md).

To explore more that NuGet has to offer, see the following articles:
For more information about NuGet, see the following articles:

- [Create a NuGet package](../create-packages/creating-a-package-dotnet-cli.md)
- [Publish a package](../nuget-org/publish-a-package.md)
- [Build a prerelease package](../create-packages/Prerelease-Packages.md)
- [Support multiple .NET Framework versions](../create-packages/multiple-target-frameworks-project-file.md)
- [Create a NuGet package with the dotnet CLI](../create-packages/creating-a-package-dotnet-cli.md)
- [Publish NuGet packages](../nuget-org/publish-a-package.md)
- [Building pre-release packages](../create-packages/Prerelease-Packages.md)
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These links use the wrong filename casing and will break on case-sensitive builds. The targets in this repo are docs/create-packages/Creating-a-Package.md and docs/nuget-org/Publish-a-package.md, so update the links to match that casing.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit 4309ef6 corrects the capitalization.

@learn-build-service-prod
Copy link
Copy Markdown

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@JKirsch1
Copy link
Copy Markdown
Contributor Author

@Mikejo5000, @nkolev92: This PR is ready for review for Feature 558386 - Q&M: Refresh work for NuGet tutorials and how to's.

Here's the staged view of the updated article: Quickstart: Create and publish a NuGet package using Visual Studio (Windows only).

All edits are easy to adjust or revert. When you get a chance, please let me know what changes to make. Thanks!

Question about read-me files

Most edits in this PR were straightforward, but a question came up about read-me files.

In Add a readme or another file, the procedure for adding a read-me file to a package has changed. You can now use the project properties UI in Visual Studio to include a read-me file, so I added those steps to the article.

But there's a slight problem. When you follow those steps, Visual Studio adds PackageReadmeFile and None elements to the project file. The None element contains these lines:

   <ItemGroup>
       ...
       <None Update="read-me.md">
         <Pack>True</Pack>
         <PackagePath>\</PackagePath>
       </None>
       ...
   </ItemGroup>

In these lines, the None element has an Update parameter, which is different from the guidance about manually adding a read-me file, which says to use an Include parameter in the None element.

How do you want to proceed?

  1. Keep the steps for using the UI to add a read-me file in the article. It doesn't matter whether the Update or Include parameter is used in this basic case.
  2. Remove the UI steps from the article. Instead, provide steps for editing the project file manually to add a read-me file and use the Include parameter, as described in PackageReadmeFile.
  3. Take some other approach.

Note removed from an include file

The note about using the int.nugettest.org test site appears twice in the article: In the Publish with the .NET CLI or NuGet CLI section and in the Manage the published package section.

In the Publish with the .NET CLI or NuGet CLI section, the note only appears in the .NET CLI tab, not the NuGet CLI tab.

The content in both these sections is from include files. To eliminate the redundancy and inconsistency, I removed the note from the publish-dotnet.md include file, which is the source for the Publish with the .NET CLI or NuGet CLI section.

The only other article that uses the publish-dotnet.md include file (and not the publish-manage.md include file, which also contains the note) is Publish NuGet packages. I added the note to that article, but I moved it earlier in the article, so users know about the test site before they start generating keys for nuget.org.

The bottom line is that all articles that used to include the note still have it. All articles that had it twice now only have it once.

If it's okay for the note to appear twice in this article and others, just let me know, and I'll revert those changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants