Click here to Skip to main content
15,881,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When I'm updating packages in Visual Studio 2022, I get the following error :

NU3037  Package 'Microsoft.Extensions.Options 5.0.0' from source 'https://api.nuget.org/v3/index.json': The author primary signature validity period has expired.


What I have tried:

When I'm updating packages in Visual Studio 2022, I get the following error
Posted
Updated 25-Oct-22 19:37pm

1 solution

If you don't understand an error message, google it: nu3037 The author primary signature validity period has expired. - Google Search[^] this leads to NuGet Warning NU3037 | Microsoft Learn[^]
Quote:
Issue
A NuGet package signature has expired. A package signature shares the same validity period as the certificate used to generate the signature. A package signature is invalid outside of that validity period. To ensure long-term validity --- even beyond the signing certificate’s validity period --- a package signature should be timestamped with a trusted timestamp. Trusted timestamps must be added while a package signature is still valid and not expired.

Solution
Resign the package with a non-expired certificate. Optionally, add a trusted timestamp at the time of signing to ensure long-term validity of the signature.
For accept mode only, ignore the warning.
Note

When NuGet’s signature validation mode is set to accept (default), a package with an expired package signature is treated as an unsigned package and installed anyway. NU3037 is raised as a warning. When NuGet’s signature validation mode is set to require, or when running the nuget verify -signatures command, NU3037 is elevated from a warning to an error.

We can't fix that - you probably need to bring it up with the package author.
 
Share this answer
 
Comments
Json Boohem 26-Oct-22 5:33am    
Thanks for your reply, but I got the same error for all packages in my project

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900