Hi sacheu,
Please have a try this code to search your package:
ILogger logger = NullLogger.Instance;
CancellationToken cancellationToken = CancellationToken.None;
SourceRepository repository = Repository.Factory.GetCoreV3("https://api.nuget.org/v3/index.json");
PackageSearchResource resource = await repository.GetResourceAsync<PackageSearchResource>();
SearchFilter searchFilter = new SearchFilter(includePrerelease: true);
IEnumerable<IPackageSearchMetadata> results = await resource.SearchAsync(
"Azure.Communication.Chat",
searchFilter,
skip: 0,
take: 10,
logger,
cancellationToken);
foreach (IPackageSearchMetadata result in results)
{
Console.WriteLine($"Found package {result.Identity.Id} {result.Identity.Version}");
}
Best Regards, Dylan
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our *
*documentation* to enable e-mail notifications if you want to receive the related email notification for this thread.**