| 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 |
|
Invalid package id :
contoso../id.
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-, likeContoso.App.Service.
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../idtoContoso.Id.
Valid:
<PackageReference Include="Contoso.Id" Version="1.0.0" />Invalid:
<PackageReference Include="contoso../id" Version="1.0.0" />