Skip to content

[NuGet.org Bug]: NuGet Gallery shows deprecated :: syntax for dotnet new install instead of @ #10692

@jfversluis

Description

@jfversluis

Impact

It bothers me. A fix would be nice

Describe the bug

The NuGet Gallery currently displays .NET CLI template install commands using the deprecated double-colon (::) version separator, e.g., dotnet new install ::. Modern .NET SDKs (including .NET 8) display a deprecation warning when this syntax is used, and recommend using the at-symbol (@) instead: dotnet new install @. This can cause confusion for users who copy instructions from the site.

The code that generates these commands appears to be in src/NuGetGallery/Views/Packages/DisplayPackage.cshtml.

Repro Steps

  1. Visit a template package details page on NuGet.org (e.g., https://www.nuget.org/packages/Microsoft.McpServer.ProjectTemplates)
  2. Observe the install command shown under ".NET CLI":
    dotnet new install Microsoft.McpServer.ProjectTemplates::0.5.0-preview.1.25619.3
  3. Run this command with .NET 8+ and see a deprecation warning
  4. If you use @ instead (e.g., dotnet new install Microsoft.McpServer.ProjectTemplates@0.5.0-preview.1.25619.3), the deprecation warning is not shown.

Expected Behavior

The install command shown on NuGet.org should use the @ separator instead of the deprecated :: separator, e.g.
dotnet new install @

Screenshots

No response

Additional Context and logs

References:

The canonical code to update is likely here: https://github.com/NuGet/NuGetGallery/blob/main/src/NuGetGallery/Views/Packages/DisplayPackage.cshtml

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions