Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 1.22 KB

File metadata and controls

51 lines (37 loc) · 1.22 KB
title NuGet Error NU1017
description NU1017 error code
author Nigusu-Allehu
ms.author Nigusu-Allehu
ms.date 09/23/2025
ms.topic reference
f1_keywords
NU1017

NuGet Error NU1017

Scenario

Invalid package id : contoso../id.

Issue

The package ID is invalid because it does not match the required format. NuGet validates package IDs using this regex:

^\w+([.-]\w+)*$
  • The ID must start with a letter or number.
  • It can only contain letters, numbers, dots (.), and dashes (-).
  • Dots or dashes must be followed by more letters or numbers.
  • You can have multiple parts separated by . or -, like Contoso.App.Service.

Solution

To fix this error:

  • Replace or remove any invalid characters from the package ID. Only letters, numbers, dots (.), and dashes (-) are allowed.
  • Ensure the package ID starts with a letter or number.
  • Dots (.) or dashes (-) must always be followed by another letter or number (no consecutive dots/dashes, and none at the end).
  • For example, change contoso../id to Contoso.Id.

Valid:

<PackageReference Include="Contoso.Id" Version="1.0.0" />

Invalid:

<PackageReference Include="contoso../id" Version="1.0.0" />